oaOccTerm.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaOccTerm.h
00004 //
00005 // This file contains the definition for the oaOccTerm class and its public
00006 // suppporting classes. The oaOccTerm class is an abstract base for occurrences
00007 // of all types terminals.
00008 //
00009 // *****************************************************************************
00010 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00011 // Integration Initiative, this material may not be copied, modified,
00012 // re-published, uploaded, executed, or distributed in any way, in any medium,
00013 // in whole or in part, without prior written permission from Cadence.
00014 //
00015 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00016 //                           All Rights Reserved.
00017 //
00018 //  $Author: icftcm $
00019 //  $Revision: #1 $
00020 //  $Date: 2010/08/09 $
00021 //  $State: Exp $
00022 // *****************************************************************************
00023 // *****************************************************************************
00024 
00025 
00026 
00027 #if !defined(oaOccTerm_P)
00028 #define oaOccTerm_P
00029 
00030 
00031 
00032 // *****************************************************************************
00033 // Nested includes
00034 // *****************************************************************************
00035 #include "oaModTerm.h"
00036 #include "oaOccNet.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // oaOccTerm
00049 // *****************************************************************************
00050 class OA_DESIGN_DLL_API oaOccTerm : public oaOccObject {
00051 public:
00052     static oaOccTerm        *find(const oaOccurrence    *occurrence,
00053                                   const oaName          &name);
00054     static oaOccTerm        *find(const oaOccurrence    *occurrence,
00055                                   oaUInt4               position);
00056 
00057     static oaOccTerm        *find(const oaOccurrence    *occurrence,
00058                                   const oaName          &name,
00059                                   oaDomain              d);
00060     static oaOccTerm        *find(const oaOccurrence    *occurrence,
00061                                   oaUInt4               position,
00062                                   oaDomain              d);
00063 
00064     static oaUInt4          getMaxPosition(const oaOccurrence *occurrence);
00065 
00066     oaBoolean               isImplicit() const;
00067     oaBoolean               isInterface() const;
00068 
00069     oaOccBitTerm            *getBit(oaUInt4 bitIndex) const;
00070     oaOccNet                *getNet(oaBoolean preferred = false) const;
00071     oaUInt4                 getNumBits() const;
00072     oaTermType              getTermType() const;
00073     oaUInt4                 getPosition() const;
00074 
00075     oaOccNet                *getAssignedNet(oaBoolean ignoreDefault = false) const;
00076     oaOccNet                *getAssignedNet(oaAssignedNetSpec   &spec,
00077                                             oaBoolean           ignoreDefault = false) const;
00078 
00079     oaTerm                  *getTerm() const;
00080     oaModTerm               *getModTerm() const;
00081 
00082     oaOccTerm               *getReflection(oaDomain d) const;
00083 
00084     void                    getName(oaName &name) const;
00085     void                    getName(const oaNameSpace   &ns,
00086                                     oaString            &name) const;
00087 
00088     enum {dtIndex = oacTermDataType};
00089 };
00090 
00091 
00092 
00093 // *****************************************************************************
00094 // oaOccBitTerm
00095 // *****************************************************************************
00096 class OA_DESIGN_DLL_API oaOccBitTerm : public oaOccTerm {
00097 public:
00098     oaOccTermConnectDef     *getConnectDef() const;
00099 };
00100 
00101 
00102 
00103 // *****************************************************************************
00104 // Design Traits.
00105 // *****************************************************************************
00106 template<>
00107 class oaTraits<oaOccBitTerm> {
00108 public:
00109     typedef oaTermModTypeEnum   modTypeType;
00110     typedef oaOccTerm           parentType;
00111     enum {dtIndex = oacTermDataType};
00112     enum {dataTypeEnumVal = oacTermDataType};
00113     enum {domain = oacOccDomain};
00114     enum {isMultiDomain = true};
00115     enum {dbType = oacDesignDBType};
00116     enum {isConcrete = false};
00117     enum {abstractTypeEnumVal = oacOccBitTermType};
00118 };
00119 
00120 template<>
00121 class oaTraits<oaOccTerm> {
00122 public:
00123     typedef oaOccObject         parentType;
00124     typedef oaTermModTypeEnum   modTypeType;
00125     enum {domain = oacOccDomain};
00126     enum {isMultiDomain = true};
00127     enum {dbType = oacDesignDBType};
00128     enum {isConcrete = false};
00129     enum {dtIndex = oacTermDataType};
00130     enum {dataTypeEnumVal = oacTermDataType};
00131     enum {abstractTypeEnumVal = oacOccTermType};
00132 };
00133 
00134 
00135 
00136 END_OA_NAMESPACE
00137 
00138 #endif

Return to top of page