00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaDevice.h 00004 // 00005 // This file contains the definitions for the oaDevice and oaEndpointType 00006 // classes. oaDevice is an abstract base for all devices in the parasitic graph 00007 // for a net. For devices that have two endpoints, oaEndpointType is used to 00008 // distinguish between the two. 00009 // 00010 // ***************************************************************************** 00011 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00012 // Integration Initiative, this material may not be copied, modified, 00013 // re-published, uploaded, executed, or distributed in any way, in any medium, 00014 // in whole or in part, without prior written permission from Cadence. 00015 // 00016 // Copyright 2002-2005 Cadence Design Systems, Inc. 00017 // All Rights Reserved. 00018 // 00019 // $Author: icftcm $ 00020 // $Revision: #1 $ 00021 // $Date: 2010/08/09 $ 00022 // $State: Exp $ 00023 // ***************************************************************************** 00024 // ***************************************************************************** 00025 00026 00027 00028 #if !defined(oaDevice_P) 00029 #define oaDevice_P 00030 00031 00032 00033 // ***************************************************************************** 00034 // Nested includes 00035 // ***************************************************************************** 00036 #include "oaDesignModTypes.h" 00037 #include "oaDesign.h" 00038 00039 00040 00041 // ***************************************************************************** 00042 // Declare and define types in the OpenAccess namespace. 00043 // ***************************************************************************** 00044 BEGIN_OA_NAMESPACE 00045 00046 00047 00048 // ***************************************************************************** 00049 // Constants 00050 // ***************************************************************************** 00051 #define oacInvalidDeviceID oacNullIndex 00052 00053 00054 00055 // ***************************************************************************** 00056 // oaEndpointEnum 00057 // ***************************************************************************** 00058 #define oavNumEndpointTypes 2 00059 00060 enum oaEndpointTypeEnum { 00061 oacFromEndpointType = 0, 00062 oacToEndpointType = 1 00063 }; 00064 00065 00066 00067 // ***************************************************************************** 00068 // oaEndpointType 00069 // ***************************************************************************** 00070 class OA_DESIGN_DLL_API oaEndpointType { 00071 public: 00072 oaEndpointType(oaEndpointTypeEnum valueIn); 00073 oaEndpointType(const oaString &name); 00074 ~oaEndpointType(); 00075 00076 const oaString &getName() const; 00077 00078 operator oaEndpointTypeEnum() const; 00079 00080 private: 00081 oaEndpointTypeEnum value; 00082 00083 static const oaString names[]; 00084 }; 00085 00086 00087 00088 // ***************************************************************************** 00089 // oaDevice 00090 // ***************************************************************************** 00091 class OA_DESIGN_DLL_API oaDevice : public oaDesignObject { 00092 public: 00093 static oaDevice *find(const oaParasiticNetwork *network, 00094 oaUInt4 id, 00095 oaBoolean local); 00096 00097 static oaDevice *find(const oaParasiticNetwork *network, 00098 const oaString &name); 00099 00100 static oaBoolean isValidName(const oaParasiticNetwork *network, 00101 const oaString &name); 00102 00103 static oaUInt4 getUniqueId(oaParasiticNetwork *network); 00104 static oaUInt4 getUniqueId(oaDesign *design); 00105 00106 void destroy(); 00107 00108 oaBoolean hasId() const; 00109 00110 oaUInt4 getId() const; 00111 00112 void setName(const oaString &name); 00113 void getName(oaString &name) const; 00114 00115 oaParasiticNetwork *getParasiticNetwork() const; 00116 00117 void addToSubNetwork(oaSubNetwork *subNetwork); 00118 void removeFromSubNetwork(oaSubNetwork *subNetwork); 00119 00120 oaCollection<oaSubNetwork, oaDevice> getSubNetworks() const; 00121 00122 enum {dtIndex = oacDeviceDataType}; 00123 enum {domain = oacNoDomain}; 00124 }; 00125 00126 00127 00128 // ***************************************************************************** 00129 // Design Traits. 00130 // ***************************************************************************** 00131 template<> 00132 class oaTraits<oaDevice> { 00133 public: 00134 typedef oaDesignObject parentType; 00135 typedef oaDeviceModTypeEnum modTypeType; 00136 enum {dbType = oacDesignDBType}; 00137 enum {domain = oacNoDomain}; 00138 enum {isMultiDomain = false}; 00139 enum {isConcrete = false}; 00140 enum {dtIndex = oacDeviceDataType}; 00141 enum {dataTypeEnumVal = oacDeviceDataType}; 00142 enum {abstractTypeEnumVal = oacDeviceType}; 00143 }; 00144 00145 00146 00147 END_OA_NAMESPACE 00148 00149 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.