oaDesign.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaDesign.h
00004 //
00005 // This file contains the definition for the oaDesign class and its public
00006 // supporting classes. The oaDesign class implements a design, i.e. a
00007 // specific view of a cell. It is the main object for storing information about
00008 // a particular design element. It implements methods for accessing all
00009 // information in the design. The supporting classes include:
00010 //
00011 //  oaCellType
00012 //      This simple class represents the cell-type of a design.
00013 //
00014 //  oaDesignArray
00015 //      This class implements an array of const oaDesign pointers. This array
00016 //      is used in the recursion observer notifications.
00017 //
00018 // *****************************************************************************
00019 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00020 // Integration Initiative, this material may not be copied, modified,
00021 // re-published, uploaded, executed, or distributed in any way, in any medium,
00022 // in whole or in part, without prior written permission from Cadence.
00023 //
00024 //                Copyright 2002-2010 Cadence Design Systems, Inc.
00025 //                           All Rights Reserved.
00026 //
00027 //  $Author: icftcm $
00028 //  $Revision: #1 $
00029 //  $Date: 2010/08/09 $
00030 //  $State$
00031 // *****************************************************************************
00032 // *****************************************************************************
00033 
00034 
00035 
00036 #if !defined(oaDesign_P)
00037 #define oaDesign_P
00038 
00039 
00040 
00041 // *****************************************************************************
00042 // Nested includes
00043 // *****************************************************************************
00044 #include "oaParam.h"
00045 #include "oaViaDef.h"
00046 #include "oaDesignModTypes.h"
00047 #include "oaDesignObject.h"
00048 #include "oaDesignCollection.h"
00049 #include "oaAttrType.h"
00050 #include "oaSaveRecover.h"
00051 
00052 
00053 
00054 // *****************************************************************************
00055 // Declare and define types in the OpenAccess namespace.
00056 // *****************************************************************************
00057 BEGIN_OA_NAMESPACE
00058 
00059 
00060 
00061 // *****************************************************************************
00062 // oaDesignAttrTypeEnum
00063 // *****************************************************************************
00064 #define oavNumDesignAttrTypes       5
00065 
00066 enum oaDesignAttrTypeEnum {
00067     oacLibNameDesignAttrType        = 0,
00068     oacCellNameDesignAttrType       = 1,
00069     oacViewNameDesignAttrType       = 2,
00070     oacCellTypeDesignAttrType       = 3,
00071     oacLastSavedTimeDesignAttrType  = 4
00072 };
00073 
00074 
00075 
00076 // *****************************************************************************
00077 // oaDesignAttrType
00078 // *****************************************************************************
00079 class OA_DESIGN_DLL_API oaDesignAttrType : public oaAttrType {
00080 public:
00081                             oaDesignAttrType(oaDesignAttrTypeEnum valueIn);
00082                             oaDesignAttrType(const oaString &name);
00083                             oaDesignAttrType(oaAttrType attr);
00084 
00085     virtual const oaString  &getName() const;
00086 
00087     oaDesignAttrTypeEnum    getValue() const;
00088 
00089 private:
00090     static const oaString   names[];
00091 };
00092 
00093 
00094 
00095 // *****************************************************************************
00096 // oaCellTypeEnum
00097 // *****************************************************************************
00098 #define oavNumCellTypes     16
00099 
00100 enum oaCellTypeEnum {
00101     oacNoCellType               = 0,
00102     oacBlockCellType            = 1,
00103     oacBlockRingCellType        = 2,
00104     oacCoverCellType            = 3,
00105     oacCoverBumpCellType        = 4,
00106     oacPadCellType              = 5,
00107     oacPadSpacerCellType        = 6,
00108     oacCoreCellType             = 7,
00109     oacCoreSpacerCellType       = 8,
00110     oacCoreAntennaCellType      = 9,
00111     oacCornerCellType           = 10,
00112     oacSoftMacroCellType        = 11,
00113     oacViaCellType              = 12,
00114     oacBlockBlackBoxCellType    = 13,
00115     oacPadAreaIOCellType        = 14,
00116     oacCoreWellTapCellType      = 15
00117 };
00118 
00119 
00120 
00121 // *****************************************************************************
00122 // oaCellType
00123 // *****************************************************************************
00124 class OA_DESIGN_DLL_API oaCellType {
00125 public:
00126                             oaCellType(oaCellTypeEnum valueIn);
00127                             oaCellType(const oaString &name);
00128                             ~oaCellType();
00129 
00130     const oaString          &getName() const;
00131 
00132                             operator                oaCellTypeEnum() const;
00133 
00134 private:
00135     oaCellTypeEnum          value;
00136 
00137     static const oaString   names[];
00138 };
00139 
00140 
00141 
00142 // *****************************************************************************
00143 // oaDesign
00144 // *****************************************************************************
00145 class OA_DESIGN_DLL_API oaDesign : public oaDesignObject {
00146 public:
00147     static oaDesign                                 *open(const oaScalarName    &libNameIn,
00148                                                           const oaScalarName    &cellNameIn,
00149                                                           const oaScalarName    &viewNameIn,
00150                                                           const oaViewType      *viewType,
00151                                                           oaChar                mode);
00152     static oaDesign                                 *open(const oaScalarName    &libNameIn,
00153                                                           const oaScalarName    &cellNameIn,
00154                                                           const oaScalarName    &viewNameIn,
00155                                                           oaChar                mode);
00156     static oaDesign                                 *open(const oaScalarName    &libNameIn,
00157                                                           const oaScalarName    &cellNameIn,
00158                                                           const oaScalarName    &viewNameIn,
00159                                                           const oaParamArray    &params);
00160     static oaDesign                                 *open(oaStdViaDef   *viaDef,
00161                                                           oaViaParam    *params = NULL);
00162     static oaDesign                                 *open(oaCustomViaDef    *viaDef,
00163                                                           oaParamArray      *params = NULL);
00164 
00165     static oaDesign                                 *recover(const oaScalarName &libNameIn,
00166                                                              const oaScalarName &cellNameIn,
00167                                                              const oaScalarName &viewNameIn,
00168                                                              oaSaveRecoverType  type);
00169 
00170     static oaDesign                                 *find(const oaScalarName    &libNameIn,
00171                                                           const oaScalarName    &cellNameIn,
00172                                                           const oaScalarName    &viewNameIn);
00173     static oaBoolean                                exists(const oaScalarName   &libNameIn,
00174                                                            const oaScalarName   &cellNameIn,
00175                                                            const oaScalarName   &viewNameIn);
00176     static oaBoolean                                exists(const oaScalarName   &libNameIn,
00177                                                            const oaScalarName   &cellNameIn,
00178                                                            const oaScalarName   &viewNameIn,
00179                                                            oaSaveRecoverType    type);
00180     static void                                     destroy(const oaScalarName  &libNameIn,
00181                                                             const oaScalarName  &cellNameIn,
00182                                                             const oaScalarName  &viewNameIn);
00183     static void                                     destroy(const oaScalarName  &libNameIn,
00184                                                             const oaScalarName  &cellNameIn,
00185                                                             const oaScalarName  &viewNameIn,
00186                                                             oaSaveRecoverType   type);
00187 
00188     void                                            close();
00189     void                                            purge();
00190     void                                            save();
00191     void                                            save(oaSaveRecoverType type);
00192     void                                            saveAs(const oaScalarName   &libNameIn,
00193                                                            const oaScalarName   &cellNameIn,
00194                                                            const oaScalarName   &viewNameIn);
00195     void                                            saveAs(const oaScalarName   &libNameIn,
00196                                                            const oaScalarName   &cellNameIn,
00197                                                            const oaScalarName   &viewNameIn,
00198                                                            oaBoolean            renameTopModule);
00199     void                                            reopen(oaChar mode);
00200     void                                            revert();
00201 
00202     void                                            getLibName(oaScalarName &libName) const;
00203     void                                            getCellName(oaScalarName &cellName) const;
00204     void                                            getViewName(oaScalarName &viewName) const;
00205 
00206     void                                            getLibName(const oaNameSpace    &ns,
00207                                                                oaString             &libName) const;
00208     void                                            getCellName(const oaNameSpace   &ns,
00209                                                                 oaString            &cellName) const;
00210     void                                            getViewName(const oaNameSpace   &ns,
00211                                                                 oaString            &viewName) const;
00212 
00213     oaLib                                           *getLib() const;
00214     oaBlock                                         *getTopBlock() const;
00215     oaModule                                        *getTopModule() const;
00216     oaOccurrence                                    *getTopOccurrence() const;
00217 
00218     oaChar                                          getMode() const;
00219     oaUInt4                                         getRefCount() const;
00220     oaTime                                          getCreateTime() const;
00221     oaTime                                          getReadInTime() const;
00222     oaTime                                          getLastSavedTime() const;
00223     oaCellType                                      getCellType() const;
00224     oaViewType                                      *getViewType() const;
00225     oaTimeStamp                                     getTimeStamp(oaDesignDataType type) const;
00226     oaTimeStamp                                     getTimeStamp(oaAppObjectDef *def) const;
00227     oaTech                                          *getTech() const;
00228     oaBoolean                                       isModified() const;
00229     oaBoolean                                       isRecovered() const;
00230     void                                            getParams(oaParamArray &params) const;
00231     void                                            getParams(oaParamArray  &params,
00232                                                               oaBoolean     includeDefaults) const;
00233     void                                            getParams(oaViaParam &params) const;
00234     oaDesign                                        *getSuperMaster() const;
00235     oaBoolean                                       isSuperMaster() const;
00236     oaBoolean                                       isSubMaster() const;
00237     oaBoolean                                       isStdViaMaster() const;
00238     oaPcellDef                                      *getPcellDef() const;
00239     void                                            getPcellEvaluatorName(oaString &evalName) const;
00240 
00241     oaBoolean                                       hasSymmetricConnectivity() const;
00242 
00243     void                                            setCellType(oaCellType cellType);
00244 
00245     void                                            setTopModule(oaModule   *module,
00246                                                                  oaBoolean  visibleToBlock = true);
00247 
00248     oaBoolean                                       isScalarized() const;
00249     void                                            scalarize();
00250 
00251     void                                            openHier();
00252     void                                            openHier(oaUInt4 numLevels);
00253 
00254     oaBoolean                                       contains(oaDesign *design);
00255     oaBoolean                                       hasRecursion() const;
00256     oaBoolean                                       hasReference(const oaDesign *design) const;
00257 
00258     void                                            defineSuperMaster(oaPcellDef            *def,
00259                                                                       const oaParamArray    &pa);
00260     void                                            evalSuperMaster();
00261     void                                            undefineSuperMaster();
00262 
00263     oaBoolean                                       findParam(const oaString    &name,
00264                                                               oaParam           &param) const;
00265 
00266     void                                            enableTimeStamps(oaBoolean value =  true);
00267 
00268     void                                            preAllocate(oaDesignDataTypeEnum    dataType,
00269                                                                 oaUInt4                 numObjs);
00270     void                                            preAllocate(oaType  type,
00271                                                                 oaUInt4 numObjs);
00272 
00273     void                                            enableUndo(oaBoolean value = true);
00274     void                                            enableUndo(oaBoolean        value,
00275                                                                oaUndoModelEnum  undoModel);
00276 
00277     void                                            redo();
00278     void                                            undo();
00279 
00280     oaBoolean                                       isUndoEnabled() const;
00281     oaBoolean                                       isInUndo() const;
00282 
00283     void                                            setCp();
00284     void                                            setCp(oaUInt4 checkPointID);
00285 
00286     void                                            unsetCp();
00287 
00288     oaUInt4                                         getNumUndoCpRecs() const;
00289     oaUInt4                                         getCpID() const;
00290     oaUInt4                                         getNumUndoRecsOnCp() const;
00291 
00292     oaUndoModelEnum                                 getUndoModel() const;
00293     oaUndoModelEnum                                 getEffectiveUndoModel() const;
00294 
00295     oaUInt8                                         calcVMSize() const;
00296     void                                            minimizeVM();
00297 
00298     oaBoolean                                       hasDefaultConstraintGroup() const;
00299     oaConstraintGroup                               *getDefaultConstraintGroup() const;
00300 
00301     static oaUInt4                                  getRevNumber();
00302 
00303     void                                            getFeatures(oaUInt4         &dataModelRev,
00304                                                                 oaFeatureArray  &features);
00305 
00306     oaCollection<oaAnalysisPoint, oaDesign>         getAnalysisPoints() const;
00307     oaCollection<oaDesign, oaDesign>                getSubMasters() const;
00308     oaCollection<oaModule, oaDesign>                getModules() const;
00309     oaCollection<oaModInstHeader, oaDesign>         getModInstHeaders() const;
00310     oaCollection<oaInstHeader, oaDesign>            getUsedIn() const;
00311     oaCollection<oaViaHeader, oaDesign>             getViaHeaderUsedIn() const;
00312     oaCollection<oaGroup, oaDesign>                 getGroups(oaUInt4 filterFlags = oacGroupIterNoDomain) const;
00313     oaCollection<oaGroup, oaDesign>                 getGroups(oaGroupDef    *def,
00314                                                               oaUInt4       filterFlags = oacGroupIterNoDomain) const;
00315     oaCollection<oaGroup, oaDesign>                 getGroupsByName(const oaString  &name,
00316                                                                     oaUInt4         filterFlags = oacGroupIterNoDomain) const;
00317     oaCollection<oaAppDef, oaDesign>                getAppDefsByDataType(oaDesignDataType   dataType,
00318                                                                          oaDomain           domain) const;
00319     oaCollection<oaAppObjectDef, oaDesign>          getAppObjectDefs() const;
00320     oaCollection<oaAppObject, oaDesign>             getAppObjects(const oaAppObjectDef *def) const;
00321     oaCollection<oaValue, oaDesign>                 getValues() const;
00322     oaCollection<oaConstraintGroup, oaDesign>       getConstraintGroups() const;
00323     oaCollection<oaConstraintGroup, oaDesign>       getConstraintGroups(const oaConstraintGroupDef *def) const;
00324     oaCollection<oaConstraint, oaDesign>            getConstraints(const oaConstraintDef *def = NULL) const;
00325     oaCollection<oaConstraintParam, oaDesign>       getConstraintParams() const;
00326     oaCollection<oaConstraintGroupHeader, oaDesign> getConstraintGroupHeaders() const;
00327     oaCollection<oaViaVariant, oaDesign>            getViaVariants() const;
00328     oaCollection<oaViaVariantHeader, oaDesign>      getViaVariantHeaders() const;
00329 
00330     static oaCollection<oaDesign, oaDesign>         getOpenDesigns();
00331 
00332     enum {dtIndex = oacDesignDataType};
00333     enum {domain = oacNoDomain};
00334 };
00335 
00336 
00337 
00338 // *****************************************************************************
00339 // oaDesignArray
00340 // *****************************************************************************
00341 class OA_DESIGN_DLL_API oaDesignArray : public oaArray<oaDesign*> {
00342 public:
00343                             oaDesignArray(oaUInt4   sizeIn = 0);
00344 };
00345 
00346 
00347 
00348 // *****************************************************************************
00349 // Design Traits.
00350 // *****************************************************************************
00351 template<>
00352 class oaTraits<oaDesign> {
00353 public:
00354     typedef oaDesignObject      parentType;
00355     typedef oaDesignModTypeEnum modTypeType;
00356     enum {dbType = oacDesignDBType};
00357     enum {domain = oacNoDomain};
00358     enum {isMultiDomain = false};
00359     enum {isConcrete = true};
00360     enum {objectTypeEnumVal = oacDesignType};
00361     enum {dtIndex = oacDesignDataType};
00362     enum {dataTypeEnumVal = oacDesignDataType};
00363 };
00364 
00365 
00366 
00367 END_OA_NAMESPACE
00368 
00369 #endif

Return to top of page