oaModTerm.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaModTerm.h
00004 //
00005 // This file contains the definition for the oaModTerm class and its public
00006 // suppporting class. The oaModTerm class is an abstract base for all types of
00007 // terminals in the module domain.
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(oaModTerm_P)
00028 #define oaModTerm_P
00029 
00030 
00031 
00032 // *****************************************************************************
00033 // Nested includes
00034 // *****************************************************************************
00035 #include "oaModNet.h"
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Declare and define types in the OpenAccess namespace.
00041 // *****************************************************************************
00042 BEGIN_OA_NAMESPACE
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // oaModTerm
00048 // *****************************************************************************
00049 class OA_DESIGN_DLL_API oaModTerm : public oaModObject {
00050 public:
00051     static oaModTerm                    *create(oaModNet        *modNet,
00052                                                 const oaName    &name,
00053                                                 oaTermType      termType = oacInputOutputTermType);
00054 
00055     static oaModTerm                    *find(const oaModule    *module,
00056                                               const oaName      &name);
00057     static oaModTerm                    *find(const oaModule    *module,
00058                                               oaUInt4           position);
00059 
00060     static oaBoolean                    isValidName(const oaModNet  *net,
00061                                                     const oaName    &name);
00062 
00063     static oaUInt4                      getMaxPosition(const oaModule *module);
00064 
00065     void                                destroy();
00066 
00067     oaBoolean                           isImplicit() const;
00068     oaBoolean                           isInterface() const;
00069 
00070     oaModBitTerm                        *getBit(oaUInt4 bitIndex) const;
00071     oaModNet                            *getNet(oaBoolean preferred = false) const;
00072     oaUInt4                             getNumBits() const;
00073     oaTermType                          getTermType() const;
00074     oaUInt4                             getPosition() const;
00075 
00076     void                                getName(oaName &name) const;
00077     void                                getName(const oaNameSpace   &ns,
00078                                                 oaString            &name) const;
00079 
00080     void                                moveToNet(oaModNet *net);
00081 
00082     void                                setTermType(oaTermType termType);
00083     void                                setIsInterface(oaBoolean isInterface);
00084 
00085     void                                setPosition(oaUInt4 position);
00086     void                                unsetPosition();
00087 
00088     void                                scalarize();
00089 
00090     oaCollection<oaOccTerm, oaModTerm>  getOccTerms(const oaOccurrence *top) const;
00091 
00092     enum {dtIndex = oacTermDataType};
00093 };
00094 
00095 
00096 
00097 // *****************************************************************************
00098 // oaModBitTerm
00099 // *****************************************************************************
00100 class OA_DESIGN_DLL_API oaModBitTerm : public oaModTerm {
00101 public:
00102     oaModTermConnectDef     *getConnectDef() const;
00103 };
00104 
00105 
00106 
00107 // *****************************************************************************
00108 // Design Traits.
00109 // *****************************************************************************
00110 template<>
00111 class oaTraits<oaModTerm> {
00112 public:
00113     typedef oaModObject         parentType;
00114     typedef oaTermModTypeEnum   modTypeType;
00115     enum {domain = oacModDomain};
00116     enum {isMultiDomain = true};
00117     enum {dbType = oacDesignDBType};
00118     enum {isConcrete = false};
00119     enum {dtIndex = oacTermDataType};
00120     enum {dataTypeEnumVal = oacTermDataType};
00121     enum {abstractTypeEnumVal = oacModTermType};
00122 };
00123 
00124 template<>
00125 class oaTraits<oaModBitTerm> {
00126 public:
00127     typedef oaTermModTypeEnum   modTypeType;
00128     typedef oaModTerm           parentType;
00129     enum {dtIndex = oacTermDataType};
00130     enum {dataTypeEnumVal = oacTermDataType};
00131     enum {domain = oacModDomain};
00132     enum {isMultiDomain = true};
00133     enum {dbType = oacDesignDBType};
00134     enum {isConcrete = false};
00135     enum {abstractTypeEnumVal = oacModBitTermType};
00136 };
00137 
00138 
00139 
00140 END_OA_NAMESPACE
00141 
00142 #endif

Return to top of page