oaModule.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaModule.h
00004 //
00005 // This file contains the definition for the oaModule class and its public
00006 // supporting classes. The oaModule class represents a level of logical 
00007 // hierarchy in a design. It implements methods for accessing information which
00008 // is contained in the module. There are zero or one top modules in a design.
00009 // There may be several levels of module hierarchy within a design, so each 
00010 // module may contain other modules.
00011 //
00012 // *****************************************************************************
00013 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00014 // Integration Initiative, this material may not be copied, modified,
00015 // re-published, uploaded, executed, or distributed in any way, in any medium,
00016 // in whole or in part, without prior written permission from Cadence.
00017 //
00018 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00019 //                           All Rights Reserved.
00020 //
00021 //  $Author: icftcm $
00022 //  $Revision: #1 $
00023 //  $Date: 2010/08/09 $
00024 //  $State: Exp $
00025 // *****************************************************************************
00026 // *****************************************************************************
00027 
00028 
00029 
00030 #if !defined(oaModule_P)
00031 #define oaModule_P
00032 
00033 
00034 
00035 // *****************************************************************************
00036 // Nested includes
00037 // *****************************************************************************
00038 #include "oaBlock.h"
00039 #include "oaModObject.h"
00040 
00041 
00042 
00043 // *****************************************************************************
00044 // Declare and define types in the OpenAccess namespace.
00045 // *****************************************************************************
00046 BEGIN_OA_NAMESPACE
00047 
00048 
00049 
00050 // *****************************************************************************
00051 // oaDetachVisibilityEnum
00052 // *****************************************************************************
00053 enum oaDetachVisibilityEnum {
00054     oacInheritFromSourceModuleDetachVisibility  = 0,
00055     oacVisibleToBlockDomainDetachVisibility     = 1,
00056     oacExcludeFromBlockDomainDetachVisibility   = 2
00057 };
00058 
00059 
00060 
00061 // *****************************************************************************
00062 // oaModule
00063 // *****************************************************************************
00064 class OA_DESIGN_DLL_API oaModule : public oaModObject {
00065 public:
00066     static oaModule                                 *create(const oaDesign      *design,
00067                                                             const oaScalarName  &name);
00068     static oaModule                                 *create(const oaDesign *design);
00069 
00070     void                                            destroy();
00071 
00072     oaDesign                                        *detach(const oaScalarName      &libName,
00073                                                             const oaScalarName      &cellName,
00074                                                             const oaScalarName      &viewName,
00075                                                             oaDetachVisibilityEnum  view = oacInheritFromSourceModuleDetachVisibility);
00076 
00077     static oaModule                                 *find(const oaDesign        *design,
00078                                                           const oaScalarName    &name);
00079 
00080     static oaModule                                 *embed(oaDesign         *design,
00081                                                            const oaDesign   *master);
00082 
00083     void                                            getName(oaScalarName &name) const;
00084     void                                            getName(const oaNameSpace   &nameSpace,
00085                                                             oaString            &nameStr) const;
00086     void                                            getOrig(oaScalarName    &name,
00087                                                             oaScalarName    &libName,
00088                                                             oaScalarName    &cellName,
00089                                                             oaScalarName    &viewName) const;
00090 
00091     oaBoolean                                       isDerived() const;
00092     oaBoolean                                       isEmbedded() const;
00093     oaBoolean                                       isVariant(oaModule *module) const;
00094     oaBoolean                                       isClone(oaModule *module) const;
00095     oaBoolean                                       isOrigModified(oaModule *module) const;
00096 
00097     oaBlock                                         *getBlock() const;
00098     void                                            getTermsByPosition(oaModTermArray &array) const;
00099 
00100     oaBoolean                                       hasDefaultConstraintGroup() const;
00101     oaConstraintGroup                               *getDefaultConstraintGroup() const;
00102 
00103     oaCollection<oaModAssignment, oaModule>         getAssignments() const;
00104     oaCollection<oaModBusNetDef, oaModule>          getBusNetDefs() const;
00105     oaCollection<oaModBusTermDef, oaModule>         getBusTermDefs() const;
00106     oaCollection<oaModConnectDef, oaModule>         getConnectDefs() const;
00107     oaCollection<oaModModuleInstHeader, oaModule>   getModuleInstHeaders() const;
00108     oaCollection<oaModInst, oaModule>               getInsts(oaUInt4 filterFlags = oacInstIterNotImplicit) const;
00109     oaCollection<oaModInstTerm, oaModule>           getInstTerms(oaUInt4 filterFlags = oacInstTermIterNotImplicit) const;
00110     oaCollection<oaModNet, oaModule>                getNets(oaUInt4 filterFlags
00111                                                             = oacNetIterAll
00112                                                             | oacNetIterNotImplicit) const;
00113     oaCollection<oaModTerm, oaModule>               getTerms(oaUInt4 filterFlags
00114                                                              = oacTermIterAll
00115                                                              | oacTermIterNotImplicit) const;
00116     oaCollection<oaModVectorInstDef, oaModule>      getVectorInstDefs() const;
00117     oaCollection<oaOccurrence, oaModule>            getOccurrences(const oaOccurrence *top) const;
00118 
00119     enum {dtIndex = oacModuleDataType};
00120 };
00121 
00122 
00123 
00124 // *****************************************************************************
00125 // Design Traits.
00126 // *****************************************************************************
00127 template<>
00128 class oaTraits<oaModule> {
00129 public:
00130     typedef oaModObject         parentType;
00131     typedef oaModuleModTypeEnum modTypeType;
00132     enum {domain = oacModDomain};
00133     enum {isMultiDomain = true};
00134     enum {dbType = oacDesignDBType};
00135     enum {dtIndex = oacModuleDataType};
00136     enum {isConcrete = true};
00137     enum {objectTypeEnumVal = oacModuleType};
00138     enum {dataTypeEnumVal = oacModuleDataType};
00139 };
00140 
00141 
00142 
00143 END_OA_NAMESPACE
00144 
00145 #endif

Return to top of page