00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaDMData.h 00004 // 00005 // This file contains the definition for the oaDMData class. This class is 00006 // used as a database to store properties, appDefs, and groups for DM 00007 // containers. The oaDMData object is opened and referenced using a 00008 // oaDMContainer*. 00009 // 00010 // This file also contains the child classes of oaDMData. There is a child 00011 // class for each kind of container. The child classes are: oaLibData, 00012 // oaCellData, oaViewData, and oaCellViewData. These classes can be referenced 00013 // and opened using the names (and other data) which specify the 00014 // owner/container. 00015 // 00016 // ***************************************************************************** 00017 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00018 // Integration Initiative, this material may not be copied, modified, 00019 // re-published, uploaded, executed, or distributed in any way, in any medium, 00020 // in whole or in part, without prior written permission from Cadence. 00021 // 00022 // Copyright 2002-2005 Cadence Design Systems, Inc. 00023 // All Rights Reserved. 00024 // 00025 // $Author: icftcm $ 00026 // $Revision: #1 $ 00027 // $Date: 2010/08/09 $ 00028 // $State: Exp $ 00029 // ***************************************************************************** 00030 // ***************************************************************************** 00031 00032 00033 00034 #ifndef oaDMData_P 00035 #define oaDMData_P 00036 00037 00038 00039 // ***************************************************************************** 00040 // Nested includes 00041 // ***************************************************************************** 00042 #include "oaAppObjectDef.h" 00043 #include "oaView.h" 00044 #include "oaSaveRecover.h" 00045 00046 00047 00048 // ***************************************************************************** 00049 // Declare and define types in the OpenAccess namespace. 00050 // ***************************************************************************** 00051 BEGIN_OA_NAMESPACE 00052 00053 00054 00055 // ***************************************************************************** 00056 // Forward class declaration 00057 // ***************************************************************************** 00058 class oaDMContainer; 00059 00060 00061 00062 00063 // ***************************************************************************** 00064 // oaDMData 00065 // ***************************************************************************** 00066 class OA_DM_DLL_API oaDMData : public oaObject { 00067 public: 00068 static oaDMData *open(const oaDMContainer *container, 00069 oaChar mode); 00070 static oaDMData *recover(const oaDMContainer *container, 00071 oaSaveRecoverType saveRecoverType); 00072 static oaDMData *find(const oaDMContainer *container); 00073 static oaBoolean exists(const oaDMContainer *container); 00074 static oaBoolean exists(const oaDMContainer *container, 00075 oaSaveRecoverType saveRecoverType); 00076 00077 static void destroy(const oaDMContainer *container); 00078 static void destroy(const oaDMContainer *container, 00079 oaSaveRecoverType saveRecoverType); 00080 00081 void close(); 00082 void purge(); 00083 void save(); 00084 void save(oaSaveRecoverType saveRecoverType); 00085 void reopen(oaChar mode); 00086 void revert(); 00087 00088 void getLibName(oaScalarName &libName) const; 00089 void getLibName(const oaNameSpace &ns, 00090 oaString &libName) const; 00091 oaLib *getLib() const; 00092 oaChar getMode() const; 00093 oaUInt4 getRefCount() const; 00094 oaTimeStamp getTimeStamp(oaDMDataType type) const; 00095 00096 oaBoolean isModified() const; 00097 oaBoolean isRecovered() const; 00098 00099 static oaUInt4 getRevNumber(); 00100 00101 void getFeatures(oaUInt4 &dataModelRev, 00102 oaFeatureArray &features); 00103 00104 oaCollection<oaGroup, oaDMData> getGroups() const; 00105 oaCollection<oaGroup, oaDMData> getGroups(oaGroupDef *def) const; 00106 oaCollection<oaGroup, oaDMData> getGroupsByName(const oaString &name) const; 00107 00108 oaCollection<oaAppDef, oaDMData> getAppDefsByDataType(oaDMDataType dataType) const; 00109 oaCollection<oaAppObject, oaDMData> getAppObjects(const oaAppObjectDef *def) const; 00110 oaCollection<oaAppObjectDef, oaDMData> getAppObjectDefs() const; 00111 00112 static oaCollection<oaDMData, oaDMData> getOpenDMDataObjs(); 00113 00114 enum {dtIndex = oacDMDataDataType}; 00115 enum {domain = oacNoDomain}; 00116 }; 00117 00118 00119 00120 // ***************************************************************************** 00121 // oaLibDMData 00122 // ***************************************************************************** 00123 class OA_DM_DLL_API oaLibDMData : public oaDMData { 00124 public: 00125 static oaLibDMData *open(const oaScalarName &libName, 00126 oaChar mode); 00127 static oaLibDMData *recover(const oaScalarName &libName, 00128 oaSaveRecoverType saveRecoverType); 00129 00130 static oaLibDMData *find(const oaScalarName &libName); 00131 static oaBoolean exists(const oaScalarName &libName); 00132 static oaBoolean exists(const oaScalarName &libName, 00133 oaSaveRecoverType saveRecoverType); 00134 00135 static void destroy(const oaScalarName &libName); 00136 static void destroy(const oaScalarName &libName, 00137 oaSaveRecoverType saveRecoverType); 00138 }; 00139 00140 00141 00142 // ***************************************************************************** 00143 // oaCellDMData 00144 // ***************************************************************************** 00145 class OA_DM_DLL_API oaCellDMData : public oaDMData { 00146 public: 00147 static oaCellDMData *open(const oaScalarName &libName, 00148 const oaScalarName &cellName, 00149 oaChar mode); 00150 static oaCellDMData *recover(const oaScalarName &libName, 00151 const oaScalarName &cellName, 00152 oaSaveRecoverType saveRecoverType); 00153 00154 static oaCellDMData *find(const oaScalarName &libName, 00155 const oaScalarName &cellName); 00156 static oaBoolean exists(const oaScalarName &libName, 00157 const oaScalarName &cellName); 00158 static oaBoolean exists(const oaScalarName &libName, 00159 const oaScalarName &cellName, 00160 oaSaveRecoverType saveRecoverType); 00161 00162 static void destroy(const oaScalarName &libName, 00163 const oaScalarName &cellName); 00164 static void destroy(const oaScalarName &libName, 00165 const oaScalarName &cellName, 00166 oaSaveRecoverType saveRecoverType); 00167 00168 void getCellName(oaScalarName &cellName) const; 00169 void getCellName(const oaNameSpace &ns, 00170 oaString &cellName) const; 00171 }; 00172 00173 00174 00175 // ***************************************************************************** 00176 // oaViewDMData 00177 // ***************************************************************************** 00178 class OA_DM_DLL_API oaViewDMData : public oaDMData { 00179 public: 00180 static oaViewDMData *open(const oaScalarName &libName, 00181 const oaScalarName &viewName, 00182 const oaViewType *viewType, 00183 oaChar mode); 00184 static oaViewDMData *recover(const oaScalarName &libName, 00185 const oaScalarName &viewName, 00186 oaSaveRecoverType saveRecoverType); 00187 00188 static oaViewDMData *find(const oaScalarName &libName, 00189 const oaScalarName &viewName, 00190 const oaViewType *viewType); 00191 static oaBoolean exists(const oaScalarName &libName, 00192 const oaScalarName &viewName, 00193 const oaViewType *viewType); 00194 static oaBoolean exists(const oaScalarName &libName, 00195 const oaScalarName &viewName, 00196 oaSaveRecoverType saveRecoverType); 00197 00198 static void destroy(const oaScalarName &libName, 00199 const oaScalarName &viewName, 00200 const oaViewType *viewType); 00201 static void destroy(const oaScalarName &libName, 00202 const oaScalarName &viewName, 00203 oaSaveRecoverType saveRecoverType); 00204 00205 void getViewName(oaScalarName &viewName) const; 00206 void getViewName(const oaNameSpace &ns, 00207 oaString &viewName) const; 00208 oaViewType *getViewType() const; 00209 }; 00210 00211 00212 00213 // ***************************************************************************** 00214 // oaCellViewDMData 00215 // ***************************************************************************** 00216 class OA_DM_DLL_API oaCellViewDMData : public oaDMData { 00217 public: 00218 static oaCellViewDMData *open(const oaScalarName &libName, 00219 const oaScalarName &cellName, 00220 const oaScalarName &viewName, 00221 const oaViewType *viewType, 00222 oaChar mode); 00223 static oaCellViewDMData *open(const oaScalarName &libName, 00224 const oaScalarName &cellName, 00225 const oaScalarName &viewName, 00226 oaChar mode); 00227 static oaCellViewDMData *recover(const oaScalarName &libName, 00228 const oaScalarName &cellName, 00229 const oaScalarName &viewName, 00230 oaSaveRecoverType saveRecoverType); 00231 00232 static oaCellViewDMData *find(const oaScalarName &libName, 00233 const oaScalarName &cellName, 00234 const oaScalarName &viewName); 00235 static oaBoolean exists(const oaScalarName &libName, 00236 const oaScalarName &cellName, 00237 const oaScalarName &viewName); 00238 static oaBoolean exists(const oaScalarName &libName, 00239 const oaScalarName &cellName, 00240 const oaScalarName &viewName, 00241 oaSaveRecoverType saveRecoverType); 00242 00243 static void destroy(const oaScalarName &libName, 00244 const oaScalarName &cellName, 00245 const oaScalarName &viewName); 00246 static void destroy(const oaScalarName &libName, 00247 const oaScalarName &cellName, 00248 const oaScalarName &viewName, 00249 oaSaveRecoverType saveRecoverType); 00250 00251 void getCellName(oaScalarName &cellName) const; 00252 void getCellName(const oaNameSpace &ns, 00253 oaString &cellName) const; 00254 void getViewName(oaScalarName &viewName) const; 00255 void getViewName(const oaNameSpace &ns, 00256 oaString &viewName) const; 00257 oaViewType *getViewType() const; 00258 }; 00259 00260 00261 00262 // ***************************************************************************** 00263 // Traits 00264 // ***************************************************************************** 00265 template<> 00266 class oaTraits<oaDMData> { 00267 public: 00268 typedef oaObject parentType; 00269 enum {domain = oacNoDomain}; 00270 enum {isMultiDomain = false}; 00271 enum {isConcrete = false}; 00272 enum {dataTypeEnumVal = oacDMDataDataType}; 00273 enum {dbType = oacDMDataDBType}; 00274 enum {abstractTypeEnumVal = oacDMDataType}; 00275 }; 00276 00277 00278 template<> 00279 class oaTraits<oaLibDMData> { 00280 public: 00281 typedef oaDMData parentType; 00282 enum {dataTypeEnumVal = oacDMDataDataType}; 00283 enum {dbType = oacDMDataDBType}; 00284 enum {domain = oacNoDomain}; 00285 enum {isMultiDomain = false}; 00286 enum {objectTypeEnumVal = oacLibDMDataType}; 00287 enum {isConcrete = true}; 00288 }; 00289 00290 template<> 00291 class oaTraits<oaCellDMData> { 00292 public: 00293 typedef oaDMData parentType; 00294 enum {dataTypeEnumVal = oacDMDataDataType}; 00295 enum {dbType = oacDMDataDBType}; 00296 enum {domain = oacNoDomain}; 00297 enum {isMultiDomain = false}; 00298 enum {objectTypeEnumVal = oacCellDMDataType}; 00299 enum {isConcrete = true}; 00300 }; 00301 00302 template<> 00303 class oaTraits<oaViewDMData> { 00304 public: 00305 typedef oaDMData parentType; 00306 enum {dataTypeEnumVal = oacDMDataDataType}; 00307 enum {dbType = oacDMDataDBType}; 00308 enum {domain = oacNoDomain}; 00309 enum {isMultiDomain = false}; 00310 enum {objectTypeEnumVal = oacViewDMDataType}; 00311 enum {isConcrete = true}; 00312 }; 00313 00314 template<> 00315 class oaTraits<oaCellViewDMData> { 00316 public: 00317 typedef oaDMData parentType; 00318 enum {dataTypeEnumVal = oacDMDataDataType}; 00319 enum {dbType = oacDMDataDBType}; 00320 enum {domain = oacNoDomain}; 00321 enum {isMultiDomain = false}; 00322 enum {objectTypeEnumVal = oacCellViewDMDataType}; 00323 enum {isConcrete = true}; 00324 }; 00325 00326 00327 END_OA_NAMESPACE 00328 00329 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.