oaTechCollection.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaTechCollection.h
00004 //
00005 // This file contains the definitions for specialized collections and iterators
00006 // and their supporting classes used in the Tech package.
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-2007 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(oaTechCollection_P)
00027 #define oaTechCollection_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaConstraintGroup.h"
00035 #include "oaBaseCollection.h"
00036 #include "oaConstraintDef.h"
00037 #include "oaLayerArray.h"
00038 
00039 
00040 
00041 // *****************************************************************************
00042 // Declare and define types in the OpenAccess namespace.
00043 // *****************************************************************************
00044 BEGIN_OA_NAMESPACE
00045 
00046 
00047 
00048 // *****************************************************************************
00049 // Control bits for the oaTech iterators. These generic control bits should be
00050 // used to define the same object specific control bits.
00051 // *****************************************************************************
00052 #define oacTechIterAll          0x0000u
00053 #define oacTechIterLocal        0x0001u
00054 
00055 
00056 
00057 // *****************************************************************************
00058 // Control bits for the analysisLib iterators
00059 // *****************************************************************************
00060 #define oacAnalysisLibIterAll   oacTechIterAll
00061 #define oacAnalysisLibIterLocal oacTechIterLocal
00062 
00063 
00064 
00065 // *****************************************************************************
00066 // Control bits for the layer iterators
00067 // *****************************************************************************
00068 #define oacLayerIterAll         oacTechIterAll
00069 #define oacLayerIterLocal       oacTechIterLocal
00070 #define oacLayerAboveIterAll    0x0002u
00071 #define oacLayerAboveIterLocal  0x0003u
00072 #define oacLayerBelowIterAll    0x0004u
00073 #define oacLayerBelowIterLocal  0x0005u
00074 
00075 
00076 
00077 // *****************************************************************************
00078 // Control bits for the opPoint iterators
00079 // *****************************************************************************
00080 #define oacOpPointIterAll       oacTechIterAll
00081 #define oacOpPointIterLocal     oacTechIterLocal
00082 
00083 
00084 
00085 // *****************************************************************************
00086 // Control bits for the purpose iterators
00087 // *****************************************************************************
00088 #define oacPurposeIterAll       oacTechIterAll
00089 #define oacPurposeIterLocal     oacTechIterLocal
00090 
00091 
00092 
00093 // *****************************************************************************
00094 // Control bits for the siteDef iterators
00095 // *****************************************************************************
00096 #define oacSiteDefIterAll       oacTechIterAll
00097 #define oacSiteDefIterLocal     oacTechIterLocal
00098 
00099 
00100 
00101 // *****************************************************************************
00102 // Control bits for the viaDef iterators
00103 // *****************************************************************************
00104 #define oacViaDefIterAll        oacTechIterAll
00105 #define oacViaDefIterLocal      oacTechIterLocal
00106 
00107 
00108 
00109 // *****************************************************************************
00110 // Control bits for the viaSpec iterators
00111 // *****************************************************************************
00112 #define oacViaSpecIterAll       oacTechIterAll
00113 #define oacViaSpecIterLocal     oacTechIterLocal
00114 
00115 
00116 
00117 // *****************************************************************************
00118 // Control bits for the viaVariant iterators
00119 // *****************************************************************************
00120 #define oacViaVariantIterAll    oacTechIterAll
00121 #define oacViaVariantIterLocal  oacTechIterLocal
00122 
00123 
00124 
00125 // *****************************************************************************
00126 // Control bits for the viaVariantHeader iterators
00127 // *****************************************************************************
00128 #define oacViaVariantHeaderIterAll      oacTechIterAll
00129 #define oacViaVariantHeaderIterLocal    oacTechIterLocal
00130 
00131 
00132 
00133 // *****************************************************************************
00134 // Control bits for the value iterators
00135 // *****************************************************************************
00136 #define oacTechValueIterAll     oacTechIterAll
00137 #define oacTechValueIterLocal   oacTechIterLocal
00138 
00139 
00140 
00141 // *****************************************************************************
00142 // Control bits for the constraint iterators
00143 // *****************************************************************************
00144 #define oacTechConstraintIterAll        oacTechIterAll
00145 #define oacTechConstraintIterLocal      oacTechIterLocal
00146 #define oacTechConstraintIterFlagShift  31
00147 #define oacTechConstraintIterFlagMask   0x80000000u
00148 
00149 
00150 
00151 // *****************************************************************************
00152 // Control bits for the constraintGroup iterators
00153 // *****************************************************************************
00154 #define oacTechConstraintGroupIterAll           oacTechIterAll
00155 #define oacTechConstraintGroupIterLocal         oacTechIterLocal
00156 #define oacTechConstraintGroupIterInitialized   0x0002u
00157 
00158 
00159 
00160 // *****************************************************************************
00161 // Control bits for the constraintParam iterators
00162 // *****************************************************************************
00163 #define oacTechConstraintParamIterAll   oacTechIterAll
00164 #define oacTechConstraintParamIterLocal oacTechIterLocal
00165 
00166 
00167 
00168 // *****************************************************************************
00169 // Control bits for the derivedLayerParam iterators
00170 // *****************************************************************************
00171 #define oacTechDerivedLayerParamIterAll     oacTechIterAll
00172 #define oacTechDerivedLayerParamIterLocal   oacTechIterLocal
00173 
00174 
00175 
00176 // *****************************************************************************
00177 // oaCollection<oaTech, oaTech>
00178 //
00179 // These are the specialized open tech db collection definition and its methods.
00180 // *****************************************************************************
00181 template<>
00182 class OA_TECH_DLL_API oaCollection<oaTech, oaTech> : public oaDatabaseCollection {
00183 public:
00184                             oaCollection(oaUInt4 dbIDIn);
00185                             oaCollection(const oaCollection<oaTech, oaTech> &c);
00186 
00187     oaBoolean               includes(const oaTech *db) const;
00188 };
00189 
00190 
00191 
00192 // *****************************************************************************
00193 // oaIter<oaTech>
00194 //
00195 // This is the oaTech specialization of oaIter<>.
00196 // *****************************************************************************
00197 template <>
00198 class OA_TECH_DLL_API oaIter<oaTech> : public oaDatabaseIter {
00199 public:
00200                             oaIter(const oaCollection<oaTech, oaTech> &c);
00201                             oaIter(const oaIter<oaTech> &iterIn);
00202 
00203     oaTech                  *getNext();
00204 };
00205 
00206 
00207 
00208 // *****************************************************************************
00209 // oaCollection<oaAppDef, oaTech>
00210 //
00211 // This is the specialization of an oaCollection<> that supplies the collection
00212 // of appDefs in a technology database.
00213 // *****************************************************************************
00214 template <>
00215 class OA_TECH_DLL_API oaCollection<oaAppDef, oaTech> : public oaCollection<oaAppDef, oaObject> {
00216 public:
00217                             oaCollection(const oaObject *db,
00218                                          oaTechDataType dataType);
00219                             oaCollection(const oaCollection<oaAppDef, oaTech> &c);
00220 };
00221 
00222 
00223 
00224 // *****************************************************************************
00225 // oaCollection<oaAppObject, oaTech>
00226 //
00227 // This is the specialization of an oaCollection<> that supplies the collection
00228 // of appObjects in a technology database.
00229 // *****************************************************************************
00230 template <>
00231 class OA_TECH_DLL_API oaCollection<oaAppObject, oaTech> : public oaAppObjectCollection {
00232 public:
00233                             oaCollection(const oaObject         *db,
00234                                          const oaAppObjectDef   *def);
00235                             oaCollection(const oaCollection<oaAppObject, oaTech> &c);
00236 };
00237 
00238 
00239 
00240 // *****************************************************************************
00241 // oaCollection<oaAppObjectDef, oaTech>
00242 //
00243 // This is the specialization of an oaCollection<> that supplies the collection
00244 // of appObjectDefs in a technology database.
00245 // *****************************************************************************
00246 template <>
00247 class OA_TECH_DLL_API oaCollection<oaAppObjectDef, oaTech> : public oaAppObjectDefCollection {
00248 public:
00249                             oaCollection(const oaObject *db);
00250                             oaCollection(const oaCollection<oaAppObjectDef, oaTech> &c);
00251 };
00252 
00253 
00254 
00255 // *****************************************************************************
00256 // oaCollection<oaGroup, oaTech>
00257 //
00258 // This is the specialization of an oaCollection<> that supplies the collection
00259 // of groups in a technology database.
00260 // *****************************************************************************
00261 template <>
00262 class OA_TECH_DLL_API oaCollection<oaGroup, oaTech> : public oaGroupCollection {
00263 public:
00264                             oaCollection(const oaObject *db,
00265                                          oaUInt4        nameIndexIn = oacNullIndex);
00266                             oaCollection(const oaObject *db,
00267                                          oaUInt4        filterFlags,
00268                                          oaUInt4        defIndexIn);
00269                             oaCollection(const oaCollection<oaGroup, oaTech> &c);
00270 };
00271 
00272 
00273 
00274 // *****************************************************************************
00275 // oaCollection<oaConstraint, oaTech>
00276 //
00277 // This is the specialization of an oaCollection<> that supplies the collection
00278 // of constraints in a technology database.
00279 // *****************************************************************************
00280 template <>
00281 class OA_TECH_DLL_API oaCollection<oaConstraint, oaTech> : public oaConstraintCollection {
00282 public:
00283                             oaCollection(const oaObject *db);
00284                             oaCollection(const oaObject *db,
00285                                          oaUInt4        defIndexIn);
00286                             oaCollection(const oaObject *db,
00287                                          oaUInt4        defIndexIn,
00288                                          oaUInt4        flagsIn,
00289                                          oaBoolean      iterAllIn = true);
00290                             oaCollection(const oaCollection<oaConstraint, oaTech> &c);
00291 };
00292 
00293 
00294 
00295 // *****************************************************************************
00296 // oaCollection<oaLayerConstraint, oaConstraintGroup>
00297 //
00298 // This is the specialization for layer constraints in constraint group
00299 // collections.
00300 // *****************************************************************************
00301 template <>
00302 class OA_TECH_DLL_API oaCollection<oaLayerConstraint, oaConstraintGroup> : public oaConstraintInGroupCollection {
00303 public:
00304                             oaCollection(const oaConstraintGroup    *group,
00305                                          oaLayerNum                 layer,
00306                                          const oaConstraintDef      *def,
00307                                          oaBoolean                  hardOnly);
00308                             oaCollection(const oaCollection<oaLayerConstraint, oaConstraintGroup> &c);
00309 
00310 protected:
00311     virtual oaBoolean       isMatch(const oaConstraintGroupMemTbl   *mTbl,
00312                                     oaUInt4                         mIndex,
00313                                     const oaConstraint              *obj = NULL) const;
00314 
00315 private:
00316     oaLayerNum              layer;
00317 
00318     friend class oaIter<oaLayerConstraint>;
00319 };
00320 
00321 
00322 
00323 // *****************************************************************************
00324 // oaCollection<oaLayerPairConstraint, oaConstraintGroup>
00325 //
00326 // This is the specialization for layer pair constraints in constraint group
00327 // collections.
00328 // *****************************************************************************
00329 template <>
00330 class OA_TECH_DLL_API oaCollection<oaLayerPairConstraint, oaConstraintGroup> : public oaConstraintInGroupCollection {
00331 public:
00332                             oaCollection(const oaConstraintGroup    *group,
00333                                          oaLayerNum                 layer,
00334                                          oaLayerNum                 layer2,
00335                                          const oaConstraintDef      *def,
00336                                          oaBoolean                  hardOnly);
00337                             oaCollection(const oaCollection<oaLayerPairConstraint, oaConstraintGroup> &c);
00338 
00339 protected:
00340     virtual oaBoolean       isMatch(const oaConstraintGroupMemTbl   *mTbl,
00341                                     oaUInt4                         mIndex,
00342                                     const oaConstraint              *obj = NULL) const;
00343 private:
00344     oaLayerNum              layer1;
00345     oaLayerNum              layer2;
00346 
00347     friend class oaIter<oaLayerPairConstraint>;
00348 };
00349 
00350 
00351 
00352 // *****************************************************************************
00353 // oaCollection<oaLayerArrayConstraint, oaConstraintGroup>
00354 //
00355 // This is the specialization for layer array constraints in constraint group
00356 // collections.
00357 // *****************************************************************************
00358 template <>
00359 class OA_TECH_DLL_API oaCollection<oaLayerArrayConstraint, oaConstraintGroup> : public oaConstraintInGroupCollection {
00360 public:
00361                             oaCollection(const oaConstraintGroup    *group,
00362                                          const oaLayerArray         &layersIn,
00363                                          const oaConstraintDef      *def,
00364                                          oaBoolean                  hardOnly);
00365                             oaCollection(const oaCollection<oaLayerArrayConstraint, oaConstraintGroup> &c);
00366 
00367 protected:
00368     virtual oaBoolean       isMatch(const oaConstraintGroupMemTbl   *mTbl,
00369                                     oaUInt4                         mIndex,
00370                                     const oaConstraint              *obj = NULL) const;
00371 private:
00372     oaLayerArray            layers;
00373 
00374     friend class oaIter<oaLayerArrayConstraint>;
00375 };
00376 
00377 
00378 
00379 // *****************************************************************************
00380 // oaIter<oaLayerConstraint>
00381 //
00382 // These are the definitions of a specialized oaIter<> class and its methods.
00383 // *****************************************************************************
00384 template <>
00385 class OA_TECH_DLL_API oaIter<oaLayerConstraint> : public oaConstraintInGroupIter {
00386 public:
00387                             oaIter(const oaCollection<oaLayerConstraint, oaConstraintGroup> &c);
00388                             oaIter(const oaIter<oaLayerConstraint> &iterIn);
00389 
00390     oaLayerConstraint       *getNext();
00391 
00392 private:
00393     virtual oaBoolean       isMatch(const oaConstraintGroupMemTbl   *tbl,
00394                                     oaUInt4                         index) const;
00395     oaLayerNum              layer;
00396 };
00397 
00398 
00399 
00400 // *****************************************************************************
00401 // oaIter<oaLayerPairConstraint>
00402 //
00403 // These are the definitions of a specialized oaIter<> class and its methods.
00404 // *****************************************************************************
00405 template <>
00406 class OA_TECH_DLL_API oaIter<oaLayerPairConstraint> : public oaConstraintInGroupIter {
00407 public:
00408                             oaIter(const oaCollection<oaLayerPairConstraint, oaConstraintGroup> &c);
00409                             oaIter(const oaIter<oaLayerPairConstraint> &iterIn);
00410 
00411     oaLayerPairConstraint   *getNext();
00412 
00413 private:
00414     virtual oaBoolean       isMatch(const oaConstraintGroupMemTbl   *tbl,
00415                                     oaUInt4                         index) const;
00416 
00417     oaLayerNum              layer1;
00418     oaLayerNum              layer2;
00419 };
00420 
00421 
00422 
00423 // *****************************************************************************
00424 // oaIter<oaLayerArrayConstraint>
00425 //
00426 // These are the definitions of a specialized oaIter<> class and its methods.
00427 // *****************************************************************************
00428 template <>
00429 class OA_TECH_DLL_API oaIter<oaLayerArrayConstraint> : public oaConstraintInGroupIter {
00430 public:
00431                             oaIter(const oaCollection<oaLayerArrayConstraint, oaConstraintGroup> &c);
00432                             oaIter(const oaIter<oaLayerArrayConstraint> &iterIn);
00433 
00434     oaLayerArrayConstraint  *getNext();
00435 
00436 private:
00437     virtual oaBoolean       isMatch(const oaConstraintGroupMemTbl   *tbl,
00438                                     oaUInt4                         index) const;
00439 
00440     const oaLayerArray      &layers;
00441 };
00442 
00443 
00444 
00445 END_OA_NAMESPACE
00446 
00447 #endif

Return to top of page