oaDesignCollection.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaDesignCollection.h
00004 //
00005 // This file contains the definitions for collections and iterators and their
00006 // supporting classes used in oaDesign 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 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaDesignCollection_P)
00027 #define oaDesignCollection_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaBaseCollection.h"
00035 #include "oaDesignDBTypes.h"
00036 #include "oaDesignObject.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // Control bits for the net iterators
00049 // *****************************************************************************
00050 #define oacNetIterAll                   0x0001u
00051 #define oacNetIterSingleBit             0x0002u
00052 #define oacNetIterBundle                0x0004u
00053 #define oacNetIterPreferred             0x0010u
00054 #define oacNetIterNotImplicit           0x0020u
00055 #define oacNetIterGlobal                0x0040u
00056 #define oacNetIterMask                  0x007fu
00057 
00058 
00059 
00060 // *****************************************************************************
00061 // Control bits for the bitNet iterators
00062 // *****************************************************************************
00063 #define oacEquivalentNetIterAll         0x0001u
00064 #define oacEquivalentNetIterExplicit    0x0002u
00065 #define oacEquivalentNetIterImplicit    0x0004u
00066 
00067 
00068 
00069 // *****************************************************************************
00070 // Control bits for the terminal iterators
00071 // *****************************************************************************
00072 #define oacTermIterAllNotHidden         0x0001u
00073 #define oacTermIterSingleBit            0x0002u
00074 #define oacTermIterBundle               0x0004u
00075 #define oacTermIterNotImplicit          0x0010u
00076 #define oacTermIterAll                  0x0020u
00077 #define oacTermIterMask                 0x003fu
00078 
00079 
00080 #define oacTermIterEquivNets            0x0100u
00081 
00082 
00083 // *****************************************************************************
00084 // Control bits for the bus terminal iterators
00085 // *****************************************************************************
00086 #define oacBusTermIterAll               0x0001u
00087 #define oacBusTermIterAllNotHidden      0x0002u
00088 #define oacBusTermIterMask              0x0003u
00089 
00090 
00091 
00092 // *****************************************************************************
00093 // Control bits for the busTermBit iterators
00094 // *****************************************************************************
00095 #define oacBusTermBitIterAll            0x0001u
00096 #define oacBusTermBitIterAllNotHidden   0x0002u
00097 #define oacBusTermBitIterMask           0x0003u
00098 
00099 
00100 
00101 // *****************************************************************************
00102 // Control bits for the instance iterators
00103 // *****************************************************************************
00104 #define oacInstIterAll                  0x0000u
00105 #define oacInstIterSingleBit            0x0001u
00106 #define oacInstIterNotImplicit          0x0002u
00107 #define oacInstIterMask                 0x0003u
00108 
00109 
00110 
00111 // *****************************************************************************
00112 // Control bits for the instTerm iterators
00113 // *****************************************************************************
00114 #define oacInstTermIterAllNotHidden     0x0000u
00115 #define oacInstTermIterSingleBit        0x0001u
00116 #define oacInstTermIterNotImplicit      0x0002u
00117 #define oacInstTermIterAll              0x0010u
00118 #define oacInstTermIterMask             0x0013u
00119 #define oacInstTermIterEquivNets        0x0004u
00120 
00121 
00122 
00123 // *****************************************************************************
00124 // Control bits for the shape iterators
00125 // *****************************************************************************
00126 #define oacShapeIterNetOnly             0x0000u
00127 #define oacShapeIterNetRoutes           0x0001u
00128 #define oacShapeIterNetPins             0x0002u
00129 
00130 
00131 
00132 // *****************************************************************************
00133 // Control bits for the guide iterators
00134 // *****************************************************************************
00135 #define oacGuideIterBeginLayer          0x0001u
00136 #define oacGuideIterEndLayer            0x0002u
00137 #define oacGuideIterBeginAndEndLayers   0x0003u
00138 
00139 
00140 
00141 // *****************************************************************************
00142 // Control bits for the via iterators
00143 // *****************************************************************************
00144 #define oacViaIterNetOnly               0x0000u
00145 #define oacViaIterNetRoutes             0x0001u
00146 #define oacViaIterNetPins               0x0002u
00147 
00148 
00149 
00150 // *****************************************************************************
00151 // Control bits for the occ object iterators
00152 // *****************************************************************************
00153 #define oavOccIterCrossDesign           0x0001u
00154 
00155 
00156 
00157 // *****************************************************************************
00158 // Control bits for the node iterators
00159 // *****************************************************************************
00160 #define oavNodeIterConnNodes            0x0001u
00161 
00162 
00163 
00164 // *****************************************************************************
00165 // Constant definitions and declarations
00166 // *****************************************************************************
00167 #define oavDesignObjectIterDataSize     16
00168 
00169 struct oaDesignObjectIterData;
00170 
00171 
00172 
00173 // *****************************************************************************
00174 // oaDesignCollTypeEnum
00175 // *****************************************************************************
00176 enum oaDesignCollTypeEnum {
00177     oacBaseDesignCollType       = 0,
00178     oacSubMasterDesignCollType  = 1
00179 };
00180 
00181 
00182 
00183 // *****************************************************************************
00184 // oaDesignIterTypeEnum
00185 // *****************************************************************************
00186 enum oaDesignIterTypeEnum {
00187     oacBaseDesignIterType       = 0,
00188     oacSubMasterDesignIterType  = 1
00189 };
00190 
00191 
00192 
00193 // *****************************************************************************
00194 // oaDesignCollection
00195 //
00196 // This is oaDesign collection and the specialized collection which derives 
00197 // from it.
00198 // *****************************************************************************
00199 class OA_DESIGN_DLL_API oaDesignCollection : public oaDatabaseCollection {
00200 public:
00201                             oaDesignCollection(oaUInt4              dbIDIn,
00202                                                oaDesignCollTypeEnum tIn,
00203                                                const oaDesign       *design = NULL);
00204                             oaDesignCollection(const oaDesignCollection &c);
00205 
00206     oaUInt4                 getCount() const;
00207     oaBoolean               isEmpty() const;
00208     oaBoolean               includes(const oaDesign *design) const;
00209 
00210 private:
00211     void                    *database;
00212     oaDesignCollTypeEnum    type;
00213 
00214     friend class oaDesignIter;
00215 };
00216 
00217 
00218 
00219 // *****************************************************************************
00220 // oaCollection<oaDesign, oaDesign>
00221 //
00222 // This is the specialized design collection.
00223 // *****************************************************************************
00224 template<>
00225 class OA_DESIGN_DLL_API oaCollection<oaDesign, oaDesign> : public oaDesignCollection {
00226 public:
00227                             oaCollection(oaUInt4                dbIDIn,
00228                                          oaDesignCollTypeEnum   tIn = oacBaseDesignCollType,
00229                                          const oaDesign         *design = NULL);
00230                             oaCollection(const oaCollection<oaDesign, oaDesign> &c);
00231 
00232     friend class oaIter<oaDesign>;
00233 };
00234 
00235 
00236 
00237 // *****************************************************************************
00238 // oaDesignIter
00239 //
00240 // This is design iterator and the specialized iterator which derives from
00241 // it.
00242 // *****************************************************************************
00243 class OA_DESIGN_DLL_API oaDesignIter : public oaDatabaseIter {
00244 public:
00245                             oaDesignIter(const oaDesignCollection &c);
00246                             oaDesignIter(const oaDesignIter &iterIn);
00247 
00248     oaDesign                *getNext();
00249     void                    reset();
00250 
00251 private:
00252     void                    *superMaster;
00253     void                    *next;
00254     oaDesignIterTypeEnum    type;
00255 };
00256 
00257 
00258 
00259 // *****************************************************************************
00260 // oaIter<oaDesign>
00261 //
00262 // This is design iterator and the specialized iterator which derives from
00263 // it.
00264 // *****************************************************************************
00265 template<>
00266 class OA_DESIGN_DLL_API oaIter<oaDesign> : public oaDesignIter {
00267 public:
00268                             oaIter(const oaCollection<oaDesign, oaDesign> &c);
00269                             oaIter(const oaIter<oaDesign> &iterIn);
00270 };
00271 
00272 
00273 
00274 // *****************************************************************************
00275 // oaCollection<oaDesignObject, oaNode>
00276 //
00277 // These are the definitions of a specialized oaIter<> class and its methods.
00278 // *****************************************************************************
00279 template <>
00280 class OA_DESIGN_DLL_API oaCollection<oaDesignObject, oaNode> {
00281 public:
00282                             oaCollection(const oaNode *node);
00283                             oaCollection(const oaCollection<oaDesignObject, oaNode> &c);
00284 
00285     oaUInt4                 getCount() const;
00286     oaBoolean               isEmpty() const;
00287     oaBoolean               includes(const oaDesignObject *object) const;
00288 
00289     const oaNode            *object;
00290 };
00291 
00292 
00293 
00294 // *****************************************************************************
00295 // oaCollection<oaDesignObject, oaParasiticNetwork>
00296 //
00297 // These are the definitions of a specialized oaIter<> class and its methods.
00298 // *****************************************************************************
00299 template <>
00300 class OA_DESIGN_DLL_API oaCollection<oaDesignObject, oaParasiticNetwork> {
00301 public:
00302                                 oaCollection(const oaParasiticNetwork *nw);
00303                                 oaCollection(const oaCollection<oaDesignObject, oaParasiticNetwork> &c);
00304 
00305     oaUInt4                     getCount() const;
00306     oaBoolean                   isEmpty() const;
00307     oaBoolean                   includes(const oaDesignObject *object) const;
00308 
00309     const oaParasiticNetwork    *object;
00310 };
00311 
00312 
00313 
00314 // *****************************************************************************
00315 // oaDesignObjectIter
00316 // 
00317 // This is the base class for oaIter<oaDesignObject>.
00318 // *****************************************************************************
00319 class OA_DESIGN_DLL_API oaDesignObjectIter {
00320 public:
00321                             oaDesignObjectIter(const oaCollection<oaDesignObject, oaNode> &c);
00322                             oaDesignObjectIter(const oaCollection<oaDesignObject, oaParasiticNetwork> &c);
00323                             oaDesignObjectIter(const oaDesignObjectIter &iter);
00324                         
00325     oaDesignObject          *getNext();
00326     void                    reset();
00327 
00328 private:
00329     enum oaDesignObjIterTypeEnum {
00330         oacNodeConnIterType     = 0,
00331         oacCoupledNetIterType   = 1
00332     };
00333 
00334     void                    *tbl;
00335     oaDomain                domain;
00336     oaDesignObjIterTypeEnum type;
00337     oaUInt4                 index;
00338     oaUInt4                 ownerIndex;
00339 };
00340 
00341 
00342 
00343 // *****************************************************************************
00344 // oaIter<oaDesignObject>
00345 //
00346 // These are the specialized definitions of an oaIter<> class and its methods.
00347 // *****************************************************************************
00348 template <>
00349 class OA_DESIGN_DLL_API oaIter<oaDesignObject> : public oaDesignObjectIter {
00350 public:
00351                             oaIter(const oaCollection<oaDesignObject, oaNode> &c);
00352                             oaIter(const oaCollection<oaDesignObject, oaParasiticNetwork> &c);
00353                             oaIter(const oaIter<oaDesignObject> &iter);
00354 };
00355 
00356 
00357 
00358 // *****************************************************************************
00359 // oaCollection<oaAppDef, oaDesign>
00360 //
00361 // These are the specialized definitions of an oaCollection<> class and its 
00362 // methods.
00363 // *****************************************************************************
00364 template <>
00365 class OA_DESIGN_DLL_API oaCollection<oaAppDef, oaDesign> : public oaCollection<oaAppDef, oaObject> {
00366 public:
00367                             oaCollection(const oaObject     *db,
00368                                          oaDesignDataType   dataType,
00369                                          oaDomain           domain);
00370                             oaCollection(const oaCollection<oaAppDef, oaDesign> &c);
00371 };
00372 
00373 
00374 
00375 // *****************************************************************************
00376 // oaCollection<oaAppObject, oaDesign>
00377 //
00378 // These are the specialized definitions of an oaCollection<> class and its 
00379 // methods.
00380 // *****************************************************************************
00381 template <>
00382 class OA_DESIGN_DLL_API oaCollection<oaAppObject, oaDesign> : public oaAppObjectCollection {
00383 public:
00384                             oaCollection(const oaObject         *db,
00385                                          const oaAppObjectDef   *def);
00386                             oaCollection(const oaCollection<oaAppObject, oaDesign> &c);
00387 };
00388 
00389 
00390 
00391 // *****************************************************************************
00392 // oaCollection<oaAppObjectDef, oaDesign>
00393 //
00394 // These are the specialized definitions of an oaCollection<> class and its 
00395 // methods.
00396 // *****************************************************************************
00397 template <>
00398 class OA_DESIGN_DLL_API oaCollection<oaAppObjectDef, oaDesign> : public oaAppObjectDefCollection {
00399 public:
00400                             oaCollection(const oaObject *db);
00401                             oaCollection(const oaCollection<oaAppObjectDef, oaDesign> &c);
00402 };
00403 
00404 
00405 
00406 // *****************************************************************************
00407 // oaCollection<oaGroup, oaDesign>
00408 //
00409 // These are the specialized definitions of an oaCollection<> class and its 
00410 // methods.
00411 // *****************************************************************************
00412 template <>
00413 class OA_DESIGN_DLL_API oaCollection<oaGroup, oaDesign> : public oaGroupCollection {
00414 public:
00415                             oaCollection(const oaObject *db,
00416                                          oaUInt4        domainFlagsIn,
00417                                          oaUInt4        nameIndexIn = oacNullIndex);
00418                             oaCollection(const oaCollection<oaGroup, oaDesign> &c);
00419 };
00420 
00421 
00422 
00423 // *****************************************************************************
00424 // oaCollection<oaConstraint, oaDesign>
00425 //
00426 // These are the specialized definitions of an oaCollection<> class and its 
00427 // methods.
00428 // *****************************************************************************
00429 template <>
00430 class OA_DESIGN_DLL_API oaCollection<oaConstraint, oaDesign> : public oaConstraintCollection {
00431 public:
00432                             oaCollection(const oaObject *db);
00433                             oaCollection(const oaObject *db,
00434                                          oaUInt4        defIndexIn);
00435                             oaCollection(const oaCollection<oaConstraint, oaDesign> &c);
00436 };
00437 
00438 
00439 
00440 END_OA_NAMESPACE
00441 
00442 #endif

Return to top of page