00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaGroupDef.h 00004 // 00005 // This file contains the definitions for the following classes: 00006 // oaGroupDef 00007 // 00008 // ***************************************************************************** 00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00010 // Integration Initiative, this material may not be copied, modified, 00011 // re-published, uploaded, executed, or distributed in any way, in any medium, 00012 // in whole or in part, without prior written permission from Cadence. 00013 // 00014 // Copyright 2006 Cadence Design Systems, Inc. 00015 // All Rights Reserved. 00016 // 00017 // $Author: icftcm $ 00018 // $Revision: #1 $ 00019 // $Date: 2010/08/09 $ 00020 // $State: Exp $ 00021 // ***************************************************************************** 00022 // ***************************************************************************** 00023 00024 00025 00026 #if !defined(oaGroupDef_P) 00027 #define oaGroupDef_P 00028 00029 00030 00031 // ***************************************************************************** 00032 // Nested includes 00033 // ***************************************************************************** 00034 #include "oaBaseModTypes.h" 00035 #include "oaArray.h" 00036 #include "oaSessionObject.h" 00037 00038 00039 00040 // ***************************************************************************** 00041 // Declare and define types in the OpenAccess namespace. 00042 // ***************************************************************************** 00043 BEGIN_OA_NAMESPACE 00044 00045 00046 00047 // ***************************************************************************** 00048 // oaGroupPurposeTypeEnum 00049 // ***************************************************************************** 00050 #define oavNumGroupPurposeTypes 6 00051 00052 enum oaGroupPurposeTypeEnum { 00053 oacUnrestrictedGroupPurposeType = 0, 00054 oacDiffNetPairGroupPurposeType = 1, 00055 oacMatchedNetGroupPurposeType = 2, 00056 oacNetGroupPurposeType = 3, 00057 oacNestedNetGroupPurposeType = 4, 00058 oacSymmetricNetGroupPurposeType = 5 00059 }; 00060 00061 00062 00063 // ***************************************************************************** 00064 // oaGroupPurposeType 00065 // ***************************************************************************** 00066 class OA_BASE_DLL_API oaGroupPurposeType { 00067 public: 00068 oaGroupPurposeType(oaGroupPurposeTypeEnum valueIn); 00069 oaGroupPurposeType(const oaString &name); 00070 00071 const oaString &getName() const; 00072 operator oaGroupPurposeTypeEnum() const; 00073 00074 private: 00075 static const oaString *initNames(); 00076 00077 oaGroupPurposeTypeEnum value; 00078 }; 00079 00080 00081 00082 // ***************************************************************************** 00083 // oaGroupDef 00084 // ***************************************************************************** 00085 class OA_BASE_DLL_API oaGroupDef : public oaSessionObject { 00086 public: 00087 static oaGroupDef *find(const oaString &name); 00088 00089 static oaGroupDef *get(oaGroupPurposeType groupDefType); 00090 void getName(oaString &name) const; 00091 void getValidTypes(oaManagedTypeArray &validTypes) const; 00092 void getValidDatabases(oaSubset<oaDBType> &validDatabases) const; 00093 oaBoolean isBuiltIn() const; 00094 00095 void destroy(); 00096 void remove(oaObject *database); 00097 00098 enum {dtIndex = oacBaseGroupDefDataType}; 00099 }; 00100 00101 00102 00103 // ***************************************************************************** 00104 // oaGroupDefArray 00105 // ***************************************************************************** 00106 class OA_BASE_DLL_API oaGroupDefArray : public oaSubset<oaGroupDef*> { 00107 }; 00108 00109 00110 00111 // ***************************************************************************** 00112 // oaFlatGroupDef 00113 // ***************************************************************************** 00114 class OA_BASE_DLL_API oaFlatGroupDef : public oaGroupDef { 00115 public: 00116 static oaFlatGroupDef *create(const oaString &name, 00117 const oaManagedTypeArray &validTypes, 00118 const oaSubset<oaDBType> &validDatabases); 00119 }; 00120 00121 00122 00123 // ***************************************************************************** 00124 // oaHierGroupDef 00125 // ***************************************************************************** 00126 class OA_BASE_DLL_API oaHierGroupDef : public oaGroupDef { 00127 public: 00128 static oaHierGroupDef *create(const oaString &name, 00129 const oaManagedTypeArray &validTypes, 00130 const oaSubset<oaDBType> &validDatabases); 00131 static oaHierGroupDef *create(const oaString &name, 00132 const oaManagedTypeArray &validTypes, 00133 const oaSubset<oaDBType> &validDatabases, 00134 const oaGroupDefArray &validGroupTypes, 00135 oaBoolean recursive = false); 00136 00137 oaBoolean isRecursive() const; 00138 void getValidGroupTypes(oaGroupDefArray &validGroupTypes) const; 00139 }; 00140 00141 00142 00143 // ***************************************************************************** 00144 // Traits 00145 // ***************************************************************************** 00146 template<> 00147 class oaTraits<oaGroupDef> { 00148 public: 00149 typedef oaSessionObject parentType; 00150 typedef oaObjectDefModTypeEnum modTypeType; 00151 enum {domain = oacNoDomain}; 00152 enum {isMultiDomain = false}; 00153 enum {isConcrete = false}; 00154 enum {dbType = oacBaseDBType}; 00155 enum {dtIndex = oacBaseGroupDefDataType}; 00156 enum {abstractTypeEnumVal = oacGroupDefType}; 00157 enum {objectTypeEnumVal = oacFlatGroupDefType}; 00158 enum {dataTypeEnumVal = oacBaseGroupDefDataType}; 00159 }; 00160 00161 template<> 00162 class oaTraits<oaFlatGroupDef> { 00163 public: 00164 typedef oaGroupDef parentType; 00165 typedef oaObjectDefModTypeEnum modTypeType; 00166 enum {domain = oacNoDomain}; 00167 enum {isMultiDomain = false}; 00168 enum {dbType = oacBaseDBType}; 00169 enum {isConcrete = true}; 00170 enum {objectTypeEnumVal = oacFlatGroupDefType}; 00171 enum {dataTypeEnumVal = oacBaseGroupDefDataType}; 00172 }; 00173 00174 template<> 00175 class oaTraits<oaHierGroupDef> { 00176 public: 00177 typedef oaGroupDef parentType; 00178 typedef oaObjectDefModTypeEnum modTypeType; 00179 enum {domain = oacNoDomain}; 00180 enum {isMultiDomain = false}; 00181 enum {dbType = oacBaseDBType}; 00182 enum {isConcrete = true}; 00183 enum {objectTypeEnumVal = oacHierGroupDefType}; 00184 enum {dataTypeEnumVal = oacBaseGroupDefDataType}; 00185 }; 00186 00187 00188 00189 // ***************************************************************************** 00190 // Explicit template instantiations 00191 // ***************************************************************************** 00192 #if defined(OA_BASE_DLL_EXTERN) 00193 OA_BASE_DLL_EXTERN template 00194 class OA_BASE_DLL_API oaArray<oaGroupDef*>; 00195 00196 #endif 00197 00198 00199 00200 END_OA_NAMESPACE 00201 00202 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.