00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaTech.h 00004 // 00005 // This file contains the definition for the oaTech class and its public 00006 // supporting classes. The oaTech class implements a technology database. 00007 // The technology database defines process information for a database. 00008 // The supporting classes include: 00009 // 00010 // oaClearanceMeasure 00011 // This simple class represents clearance measurement type. 00012 // 00013 // oaUserUnitsType 00014 // This simple class represents the supported user units types. 00015 // 00016 // oaTechArray 00017 // This class implements an array of tech pointers used in establishing 00018 // tech references. 00019 // 00020 // ***************************************************************************** 00021 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00022 // Integration Initiative, this material may not be copied, modified, 00023 // re-published, uploaded, executed, or distributed in any way, in any medium, 00024 // in whole or in part, without prior written permission from Cadence. 00025 // 00026 // Copyright 2002-2007 Cadence Design Systems, Inc. 00027 // All Rights Reserved. 00028 // 00029 // $Author: icftcm $ 00030 // $Revision: #1 $ 00031 // $Date: 2010/08/09 $ 00032 // $State: Exp $ 00033 // ***************************************************************************** 00034 // ***************************************************************************** 00035 00036 00037 00038 #if !defined(oaTech_P) 00039 #define oaTech_P 00040 00041 00042 00043 // ***************************************************************************** 00044 // Nested includes 00045 // ***************************************************************************** 00046 #include "oaConstraintGroup.h" 00047 #include "oaConstraintGroupHeader.h" 00048 #include "oaConstraintGroupDef.h" 00049 #include "oaView.h" 00050 #include "oaTechCollection.h" 00051 #include "oaTechHeader.h" 00052 #include "oaSaveRecover.h" 00053 00054 00055 00056 // ***************************************************************************** 00057 // Declare and define types in the OpenAccess namespace. 00058 // ***************************************************************************** 00059 BEGIN_OA_NAMESPACE 00060 00061 00062 00063 // ***************************************************************************** 00064 // oaClearanceMeasureEnum 00065 // ***************************************************************************** 00066 #define oavNumClearanceMeasureTypes 2 00067 00068 enum oaClearanceMeasureEnum { 00069 oacEuclidianClearanceMeasure = 0, 00070 oacMaxXYClearanceMeasure = 1 00071 }; 00072 00073 00074 00075 // ***************************************************************************** 00076 // oaClearanceMeasure 00077 // ***************************************************************************** 00078 class OA_TECH_DLL_API oaClearanceMeasure { 00079 public: 00080 oaClearanceMeasure(oaClearanceMeasureEnum valueIn); 00081 oaClearanceMeasure(const oaString &name); 00082 ~oaClearanceMeasure(); 00083 00084 const oaString &getName() const; 00085 00086 operator oaClearanceMeasureEnum() const; 00087 00088 private: 00089 oaClearanceMeasureEnum value; 00090 00091 static const oaString names[]; 00092 }; 00093 00094 00095 00096 // ***************************************************************************** 00097 // oaUserUnitsTypeEnum 00098 // ***************************************************************************** 00099 #define oavNumUserUnitsTypes 7 00100 00101 enum oaUserUnitsTypeEnum { 00102 oacMicron = 0, 00103 oacMillimeter = 1, 00104 oacCentimeter = 2, 00105 oacMeter = 3, 00106 oacMil = 4, 00107 oacInch = 5, 00108 oacNanometer = 6 00109 }; 00110 00111 00112 00113 // ***************************************************************************** 00114 // oaUserUnitsType 00115 // ***************************************************************************** 00116 class OA_TECH_DLL_API oaUserUnitsType { 00117 public: 00118 oaUserUnitsType(oaUserUnitsTypeEnum valueIn); 00119 oaUserUnitsType(const oaString &name); 00120 ~oaUserUnitsType(); 00121 00122 const oaString &getName() const; 00123 00124 operator oaUserUnitsTypeEnum() const; 00125 00126 private: 00127 oaUserUnitsTypeEnum value; 00128 00129 static const oaString names[]; 00130 }; 00131 00132 00133 00134 // ***************************************************************************** 00135 // oaTechArray 00136 // ***************************************************************************** 00137 class OA_TECH_DLL_API oaTechArray : public oaArray<oaTech*> { 00138 public: 00139 oaTechArray(oaUInt4 sizeIn = 0); 00140 }; 00141 00142 00143 00144 // ***************************************************************************** 00145 // oaAntennaModelEnum 00146 // ***************************************************************************** 00147 #define oavNumAntennaModelEnums 4 00148 00149 enum oaAntennaModelEnum { 00150 oacDefaultAntennaModel = 0, 00151 oacSecondAntennaModel = 1, 00152 oacThirdAntennaModel = 2, 00153 oacFourthAntennaModel = 3 00154 }; 00155 00156 00157 00158 // ***************************************************************************** 00159 // oaAntennaModel 00160 // ***************************************************************************** 00161 class OA_TECH_DLL_API oaAntennaModel { 00162 public: 00163 oaAntennaModel(oaAntennaModelEnum valueIn); 00164 oaAntennaModel(const oaString &name); 00165 ~oaAntennaModel(); 00166 00167 const oaString &getName() const; 00168 00169 operator oaAntennaModelEnum() const; 00170 00171 private: 00172 oaAntennaModelEnum value; 00173 00174 static const oaString names[]; 00175 }; 00176 00177 00178 00179 // ***************************************************************************** 00180 // oaTech 00181 // ***************************************************************************** 00182 class OA_TECH_DLL_API oaTech : public oaTechObject { 00183 public: 00184 static oaTech *create(const oaScalarName &libName); 00185 static oaTech *create(oaLib *lib); 00186 00187 static oaTech *open(const oaScalarName &libName, 00188 oaChar mode = 'r'); 00189 static oaTech *open(oaLib *lib, 00190 oaChar mode = 'r'); 00191 static oaTech *recover(const oaScalarName &libName, 00192 oaSaveRecoverType type); 00193 00194 static oaTech *find(const oaScalarName &libName); 00195 static oaTech *find(const oaLib *lib); 00196 00197 static void destroy(const oaScalarName &libName); 00198 static void destroy(oaLib *lib); 00199 static void destroy(const oaScalarName &libName, 00200 oaSaveRecoverType type); 00201 00202 static oaBoolean exists(const oaScalarName &libName, 00203 oaBoolean inherited = true); 00204 static oaBoolean exists(oaLib *lib, 00205 oaBoolean inherited = true); 00206 static oaBoolean exists(const oaScalarName &libName, 00207 oaSaveRecoverType type); 00208 static oaBoolean exists(oaLib *lib, 00209 oaSaveRecoverType type); 00210 00211 void close(); 00212 void purge(); 00213 void save(); 00214 void save(oaSaveRecoverType type); 00215 void saveAs(const oaScalarName &libName); 00216 void reopen(oaChar mode); 00217 void revert(); 00218 00219 void getLibName(oaScalarName &libName) const; 00220 00221 void getLibName(const oaNameSpace &ns, 00222 oaString &out) const; 00223 00224 oaLib *getLib() const; 00225 00226 oaTime getCreateTime() const; 00227 oaTime getReadInTime() const; 00228 oaTime getLastSavedTime() const; 00229 oaTimeStamp getTimeStamp(oaTechDataType type) const; 00230 oaTimeStamp getTimeStamp(oaAppObjectDef *def) const; 00231 void enableTimeStamps(oaBoolean value = true); 00232 oaChar getMode() const; 00233 oaUInt4 getRefCount() const; 00234 oaBoolean isModified() const; 00235 oaBoolean isRecovered() const; 00236 oaUInt4 getDBUPerUU(const oaViewType *viewType) const; 00237 oaUInt4 getDBUPerUU(const oaViewType *viewType, 00238 oaBoolean local) const; 00239 oaUserUnitsType getUserUnits(const oaViewType *viewType) const; 00240 oaUserUnitsType getUserUnits(const oaViewType *viewType, 00241 oaBoolean local) const; 00242 oaClearanceMeasure getClearanceMeasure() const; 00243 oaClearanceMeasure getClearanceMeasure(oaBoolean local) const; 00244 oaDist getDefaultManufacturingGrid() const; 00245 oaDist getDefaultManufacturingGrid(oaBoolean local) const; 00246 oaBoolean isGateGrounded() const; 00247 oaBoolean isGateGrounded(oaBoolean local) const; 00248 void getTechHeaders(oaTechHeaderArray &refHeaders, 00249 oaBoolean local = false) const; 00250 00251 oaBoolean hasUnboundRefs() const; 00252 00253 void setDBUPerUU(const oaViewType *viewType, 00254 oaUInt4 value); 00255 void setUserUnits(const oaViewType *viewType, 00256 oaUserUnitsType value); 00257 void setClearanceMeasure(oaClearanceMeasure measure); 00258 void setDefaultManufacturingGrid(oaDist grid); 00259 void setGateGrounded(oaBoolean gateGrounded); 00260 00261 void unsetDBUPerUU(const oaViewType *viewType); 00262 void unsetUserUnits(const oaViewType *viewType); 00263 void unsetClearanceMeasure(); 00264 void unsetDefaultManufacturingGrid(); 00265 void unsetGateGrounded(); 00266 00267 oaBoolean isDBUPerUUSet(const oaViewType *viewType) const; 00268 oaBoolean isUserUnitsSet(const oaViewType *viewType) const; 00269 oaBoolean isClearanceMeasureSet() const; 00270 oaBoolean isDefaultManufacturingGridSet() const; 00271 oaBoolean isGateGroundedSet() const; 00272 00273 void setRefs(const oaTechArray &refs); 00274 void unsetRefs(); 00275 00276 void setProcessFamily(const oaString &processFamily); 00277 void unsetProcessFamily(); 00278 void getProcessFamily(oaString &processFamily, 00279 oaBoolean local = false) const; 00280 oaBoolean hasProcessFamily(oaBoolean local = false) const; 00281 00282 oaBoolean validate() const; 00283 00284 oaInt4 uuToDBU(const oaViewType *viewType, 00285 oaDouble value); 00286 oaUInt4 uuToDBUDistance(const oaViewType *viewType, 00287 oaDouble value); 00288 oaUInt8 uuToDBUArea(const oaViewType *viewType, 00289 oaDouble value); 00290 00291 oaDouble dbuToUU(const oaViewType *viewType, 00292 oaInt4 value); 00293 oaDouble dbuToUUDistance(const oaViewType *viewType, 00294 oaUInt4 value); 00295 oaDouble dbuToUUArea(const oaViewType *viewType, 00296 oaUInt8 value); 00297 00298 void enableUndo(oaBoolean value, 00299 oaUndoModelEnum undoModel); 00300 00301 void redo(); 00302 void undo(); 00303 00304 oaBoolean isUndoEnabled() const; 00305 oaBoolean isInUndo() const; 00306 00307 void setCp(oaUInt4 checkPointID = UINT_MAX); 00308 void unsetCp(); 00309 00310 oaUInt4 getNumUndoCpRecs() const; 00311 oaUInt4 getCpID() const; 00312 oaUInt4 getNumUndoRecsOnCp() const; 00313 00314 oaUndoModelEnum getUndoModel() const; 00315 00316 oaUInt8 calcVMSize() const; 00317 void minimizeVM(); 00318 00319 oaBoolean hasDefaultConstraintGroup() const; 00320 oaConstraintGroup *getDefaultConstraintGroup() const; 00321 oaConstraintGroup *getFoundryRules() const; 00322 00323 static oaUInt4 getDefaultDBUPerUU(const oaViewType *viewType); 00324 static oaUserUnitsType getDefaultUserUnits(const oaViewType *viewType); 00325 static oaDist getDefaultDefaultManufacturingGrid(); 00326 static oaClearanceMeasure getDefaultClearanceMeasure(); 00327 static oaBoolean getDefaultIsGateGrounded(); 00328 00329 static void attach(oaLib *lib, 00330 const oaScalarName &attachLibName); 00331 static void detach(oaLib *lib); 00332 00333 static oaBoolean hasAttachment(const oaLib *lib); 00334 static void getAttachment(const oaLib *lib, 00335 oaScalarName &attachLibName); 00336 00337 static oaUInt4 getRevNumber(); 00338 00339 void getFeatures(oaUInt4 &dataModelRev, 00340 oaFeatureArray &features); 00341 00342 oaCollection<oaAnalysisLib, oaTech> getAnalysisLibs() const; 00343 oaCollection<oaAnalysisLib, oaTech> getAnalysisLibs(oaUInt4 filterFlags) const; 00344 oaCollection<oaLayer, oaTech> getLayers() const; 00345 oaCollection<oaLayer, oaTech> getLayers(oaUInt4 filterFlags) const; 00346 oaCollection<oaOpPoint, oaTech> getOpPoints() const; 00347 oaCollection<oaOpPoint, oaTech> getOpPoints(oaUInt4 filterFlags) const; 00348 oaCollection<oaPurpose, oaTech> getPurposes() const; 00349 oaCollection<oaPurpose, oaTech> getPurposes(oaUInt4 filterFlags) const; 00350 oaCollection<oaSiteDef, oaTech> getSiteDefs() const; 00351 oaCollection<oaSiteDef, oaTech> getSiteDefs(oaUInt4 filterFlags) const; 00352 oaCollection<oaValue, oaTech> getValues() const; 00353 oaCollection<oaValue, oaTech> getValues(oaUInt4 filterFlags) const; 00354 oaCollection<oaViaDef, oaTech> getViaDefs() const; 00355 oaCollection<oaViaDef, oaTech> getViaDefs(oaUInt4 filterFlags) const; 00356 oaCollection<oaViaSpec, oaTech> getViaSpecs() const; 00357 oaCollection<oaViaSpec, oaTech> getViaSpecs(oaUInt4 filterFlags) const; 00358 oaCollection<oaViaVariant, oaTech> getViaVariants(oaUInt4 filterFlags = oacViaVariantIterAll) const; 00359 oaCollection<oaViaVariantHeader, oaTech> getViaVariantHeaders(oaUInt4 filterFlags = oacViaVariantHeaderIterAll) const; 00360 00361 oaCollection<oaTechLayerHeader, oaTech> getLayerHeaders() const; 00362 oaCollection<oaTechViaDefHeader, oaTech> getViaDefHeaders() const; 00363 00364 oaCollection<oaConstraint, oaTech> getConstraints(const oaConstraintDef *def = NULL) const; 00365 oaCollection<oaConstraint, oaTech> getConstraints(const oaConstraintDef *def, 00366 oaUInt4 filterFlags) const; 00367 oaCollection<oaConstraintGroup, oaTech> getConstraintGroups() const; 00368 oaCollection<oaConstraintGroup, oaTech> getConstraintGroups(oaUInt4 filterFlags) const; 00369 oaCollection<oaConstraintGroup, oaTech> getConstraintGroups(const oaConstraintGroupDef *def, 00370 oaUInt4 filterFlags = oacTechConstraintGroupIterAll) const; 00371 00372 00373 oaCollection<oaConstraintParam, oaTech> getConstraintParams() const; 00374 oaCollection<oaConstraintParam, oaTech> getConstraintParams(oaUInt4 filterFlags) const; 00375 oaCollection<oaConstraintGroupHeader, oaTech> getConstraintGroupHeaders() const; 00376 00377 oaCollection<oaDerivedLayerParam, oaTech> getDerivedLayerParams(oaUInt4 filterFlags = oacTechDerivedLayerParamIterAll) const; 00378 00379 oaCollection<oaAppObjectDef, oaTech> getAppObjectDefs() const; 00380 oaCollection<oaAppObject, oaTech> getAppObjects(const oaAppObjectDef *def) const; 00381 oaCollection<oaAppDef, oaTech> getAppDefsByDataType(oaTechDataType dataType) const; 00382 00383 oaCollection<oaGroup, oaTech> getGroups() const; 00384 oaCollection<oaGroup, oaTech> getGroups(oaGroupDef *def) const; 00385 oaCollection<oaGroup, oaTech> getGroupsByName(const oaString &name) const; 00386 00387 oaCollection<oaTechHeader, oaTech> getUsedIn() const; 00388 00389 static oaCollection<oaTech, oaTech> getOpenTechs(); 00390 00391 enum {dtIndex = oacTechDataType}; 00392 }; 00393 00394 00395 00396 // ***************************************************************************** 00397 // oaTech traits 00398 // ***************************************************************************** 00399 template<> 00400 class oaTraits<oaTech> { 00401 public: 00402 typedef oaTechObject parentType; 00403 typedef oaTechModTypeEnum modTypeType; 00404 enum {dbType = oacTechDBType}; 00405 enum {domain = oacNoDomain}; 00406 enum {isMultiDomain = false}; 00407 enum {isConcrete = true}; 00408 enum {objectTypeEnumVal = oacTechType}; 00409 enum {dtIndex = oacTechDataType}; 00410 enum {dataTypeEnumVal = oacTechDataType}; 00411 }; 00412 00413 00414 00415 END_OA_NAMESPACE 00416 00417 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.