oaModBusTermDef.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaModBusTermDef.h
00004 //
00005 // This file contains the definition for the oaModBusTermDef class and its
00006 // public supporting classes. The oaModBusTermDef class implements the
00007 // definition of a busTerm in the module domain, including its name and
00008 // bit-range. Since multiple busTerms can refer to different members of the
00009 // same busTerm definition, the busTermDef represents the super-set of all
00010 // members of the busTerms.
00011 //
00012 // A logical busTermDef is automatically created if necessary whenever
00013 // applications create logical busTerms. These implicit logical busTerm
00014 // definitions will have no bitOrder. Applications may explicitly create a
00015 // logical busTerm definition in order to specify that it has a specific
00016 // bitOrder.
00017 //
00018 // Implicitly created logical busTerm definitions are automatically destroyed
00019 // when the last busTerm with the same name is destroyed. Explicitly created
00020 // logical busTerm definitions must be explicitly destroyed. An exception will
00021 // be thrown if an attempt is made to destroy an implicitly created logical
00022 // busNet definition. An exception will also be thrown if an attempt is made to
00023 // destroy an explicitly created logical busTerm definition that still has
00024 // logical busTerms associated with it.
00025 //
00026 // *****************************************************************************
00027 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00028 // Integration Initiative, this material may not be copied, modified,
00029 // re-published, uploaded, executed, or distributed in any way, in any medium,
00030 // in whole or in part, without prior written permission from Cadence.
00031 //
00032 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00033 //                           All Rights Reserved.
00034 //
00035 //  $Author: icftcm $
00036 //  $Revision: #1 $
00037 //  $Date: 2010/08/09 $
00038 //  $State: Exp $
00039 // *****************************************************************************
00040 // *****************************************************************************
00041 
00042 
00043 
00044 #if !defined(oaModBusTermDef_P)
00045 #define oaModBusTermDef_P
00046 
00047 
00048 
00049 // *****************************************************************************
00050 // Nested includes
00051 // *****************************************************************************
00052 #include "oaBusNetDef.h"
00053 #include "oaModule.h"
00054 
00055 
00056 
00057 // *****************************************************************************
00058 // Declare and define types in the OpenAccess namespace.
00059 // *****************************************************************************
00060 BEGIN_OA_NAMESPACE
00061 
00062 
00063 
00064 // *****************************************************************************
00065 // oaModBusTermDef
00066 // *****************************************************************************
00067 class OA_DESIGN_DLL_API oaModBusTermDef : public oaModObject {
00068 public:
00069     static oaModBusTermDef                          *create(const oaModule      *module,
00070                                                             const oaScalarName  &name,
00071                                                             oaBitOrder          order);
00072 
00073     static oaModBusTermDef                          *find(const oaModule        *module,
00074                                                           const oaScalarName    &name);
00075 
00076     void                                            destroy();
00077 
00078     oaUInt4                                         getMinIndex() const;
00079     oaUInt4                                         getMaxIndex() const;
00080     oaUInt4                                         getNumBits() const;
00081     void                                            getName(oaScalarName &name) const;
00082     void                                            getName(const oaNameSpace   &ns,
00083                                                             oaString            &name) const;
00084     oaBitOrder                                      getBitOrder() const;
00085 
00086     oaBoolean                                       isImplicit() const;
00087 
00088     void                                            setBitOrder(oaBitOrder order);
00089 
00090     oaCollection<oaModBusTerm, oaModBusTermDef>     getBusTerms() const;
00091     oaCollection<oaModBusTermBit, oaModBusTermDef>  getBusTermBits() const;
00092 
00093     enum {dtIndex = oacBusTermDefDataType};
00094 };
00095 
00096 
00097 
00098 // *****************************************************************************
00099 // Design Traits.
00100 // *****************************************************************************
00101 template<>
00102 class oaTraits<oaModBusTermDef> {
00103 public:
00104     typedef oaModObject             parentType;
00105     typedef oaBusTermDefModTypeEnum modTypeType;
00106     enum {domain = oacModDomain};
00107     enum {isMultiDomain = true};
00108     enum {dbType = oacDesignDBType};
00109     enum {dtIndex = oacBusTermDefDataType};
00110     enum {isConcrete = true};
00111     enum {objectTypeEnumVal = oacModBusTermDefType};
00112     enum {dataTypeEnumVal = oacBusTermDefDataType};
00113 };
00114 
00115 
00116 
00117 END_OA_NAMESPACE
00118 
00119 #endif

Return to top of page