oaConnCollection.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaConnCollection.h
00004 //
00005 // This file contains the definitions for collections and iterators and their
00006 // supporting classes used in conn module.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State$
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaConnCollection_P)
00027 #define oaConnCollection_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaObject.h"
00035 #include "oaDesignDBTypes.h"
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Declare and define types in the OpenAccess namespace.
00041 // *****************************************************************************
00042 BEGIN_OA_NAMESPACE
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // Forward class declaration
00048 // *****************************************************************************
00049 class oaDatabase;
00050 
00051 
00052 
00053 // *****************************************************************************
00054 // oaNetNetCollTypeEnum
00055 // *****************************************************************************
00056 enum oaNetNetCollTypeEnum {
00057     oacSingleBitMemNetCollType  = 1,
00058     oacBundleMemNetCollType     = 2,
00059     oacEquivNetCollType         = 3,
00060     oacGlobalNetCollType        = 4,
00061     oacSpanNetCollType          = 5
00062 };
00063 
00064 
00065 
00066 // *****************************************************************************
00067 // oaTermTermCollTypeEnum
00068 // *****************************************************************************
00069 enum oaTermTermCollTypeEnum {
00070     oacBundleMemTermCollType    = 1,
00071     oacMustJoinTermCollType     = 2
00072 };
00073 
00074 
00075 
00076 // *****************************************************************************
00077 // oaBaseMemNetCollection
00078 //
00079 // This is the base collection for the memNet collections.
00080 // *****************************************************************************
00081 class OA_DESIGN_DLL_API oaBaseMemNetCollection {
00082 public:
00083                             oaBaseMemNetCollection(oaDatabase   *db,
00084                                                    oaObject     *objIn,
00085                                                    oaUInt4      flag = 0);
00086 
00087     oaUInt4                 getCount();
00088     oaBoolean               isEmpty();
00089     oaBoolean               includes(const oaObject *objectIn);
00090 
00091 protected:
00092     oaObject                *object;
00093     oaDatabase              *database;
00094     oaDomain                domain;
00095     oaUInt4                 flag;
00096 
00097     friend class oaBaseMemNetIter;
00098 };
00099 
00100 
00101 
00102 // *****************************************************************************
00103 // oaMemNetCollection
00104 // *****************************************************************************
00105 class OA_DESIGN_DLL_API oaMemNetCollection : public oaBaseMemNetCollection {
00106 public:
00107                             oaMemNetCollection(oaDatabase   *db,
00108                                                oaObject     *objIn,
00109                                                oaUInt4      flag = 0);
00110 
00111     oaBoolean               includes(const oaNet *objectIn);
00112 };
00113 
00114 
00115 
00116 // *****************************************************************************
00117 // oaOccMemNetCollection
00118 // *****************************************************************************
00119 class OA_DESIGN_DLL_API oaOccMemNetCollection : public oaBaseMemNetCollection {
00120 public:
00121                             oaOccMemNetCollection(oaDatabase    *db,
00122                                                   oaObject      *objIn,
00123                                                   oaUInt4       flag = 0);
00124 
00125     oaBoolean               includes(const oaOccNet *object);
00126 };
00127 
00128 
00129 
00130 // *****************************************************************************
00131 // oaModMemNetCollection
00132 // *****************************************************************************
00133 class OA_DESIGN_DLL_API oaModMemNetCollection : public oaBaseMemNetCollection {
00134 public:
00135                             oaModMemNetCollection(oaDatabase    *db,
00136                                                   oaObject      *objIn,
00137                                                   oaUInt4       flag = 0);
00138 
00139     oaBoolean               includes(const oaModNet *object);
00140 };
00141 
00142 
00143 
00144 // *****************************************************************************
00145 // oaBaseMemNetIter
00146 // *****************************************************************************
00147 class OA_DESIGN_DLL_API oaBaseMemNetIter {
00148 public:
00149                             oaBaseMemNetIter(const oaBaseMemNetCollection &cl);
00150                             oaBaseMemNetIter(const oaBaseMemNetIter &iterIn);
00151 
00152     oaObject                *getNext(oaUInt4 &arg);
00153     void                    reset();
00154 
00155 protected:
00156     void                    findNextBundle(oaUInt4  &index,
00157                                            oaUInt4  &member);
00158 
00159     oaNetTbl                *tbl;
00160     oaBusNetDefTbl          *dTbl;
00161     oaDomain                domain;
00162     oaUInt4                 index;
00163 
00164     oaUInt4                 curNetIndex;
00165     oaUInt4                 bunNetIndex;
00166     oaUInt4                 bunMem;
00167     oaUInt4                 bitInMem;
00168     oaUInt4                 findNetIndex;
00169     oaUInt4                 busDefIndex;
00170     oaUInt4                 busNetIndex;
00171     oaUInt4                 busBit;
00172     oaBoolean               uniqueOnly;
00173 
00174 private:
00175     void                    resetIter();
00176 
00177     oaBoolean               isOccNetIter() const;
00178     oaNetTbl                *getNetTbl() const;
00179 
00180     oaObject                *getObject(oaUInt4  index,
00181                                        oaDomain domain);
00182     oaObject                *getDomainObject(oaUInt4    index,
00183                                              oaDomain   domain);
00184 
00185     enum oaMemNetState {
00186         oacMemNetSelf   = 0,
00187         oacMemNetBundle = 1,
00188         oacMemNetBus    = 2
00189     };
00190 
00191     oaMemNetState           iterState;
00192 };
00193 
00194 
00195 
00196 // *****************************************************************************
00197 // oaMemNetIter
00198 // *****************************************************************************
00199 class OA_DESIGN_DLL_API oaMemNetIter : public oaBaseMemNetIter {
00200 public:
00201                             oaMemNetIter(const oaMemNetCollection &cl);
00202                             oaMemNetIter(const oaMemNetIter &iterIn);
00203 
00204     oaNet                   *getNext(oaUInt4 &arg);
00205 };
00206 
00207 
00208 
00209 // *****************************************************************************
00210 // oaModMemNetIter
00211 // *****************************************************************************
00212 class OA_DESIGN_DLL_API oaModMemNetIter : public oaBaseMemNetIter {
00213 public:
00214                             oaModMemNetIter(const oaModMemNetCollection &cl);
00215                             oaModMemNetIter(const oaModMemNetIter &iterIn);
00216 
00217     oaModNet                *getNext(oaUInt4 &arg);
00218 };
00219 
00220 
00221 
00222 // *****************************************************************************
00223 // oaOccMemNetIter
00224 // *****************************************************************************
00225 class OA_DESIGN_DLL_API oaOccMemNetIter : public oaBaseMemNetIter {
00226 public:
00227                             oaOccMemNetIter(const oaOccMemNetCollection &cl);
00228                             oaOccMemNetIter(const oaOccMemNetIter &iterIn);
00229 
00230     oaOccNet                *getNext(oaUInt4 &arg);
00231 };
00232 
00233 
00234 
00235 END_OA_NAMESPACE
00236 
00237 #endif

Return to top of page