oaDMTypes.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaDMTypes.h
00004 //
00005 // This file contains type definitions and declarations for this package.
00006 //
00007 // *****************************************************************************
00008 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00009 // Integration Initiative, this material may not be copied, modified,
00010 // re-published, uploaded, executed, or distributed in any way, in any medium,
00011 // in whole or in part, without prior written permission from Cadence.
00012 //
00013 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00014 //                           All Rights Reserved.
00015 //
00016 //  $Author: icftcm $
00017 //  $Revision: #1 $
00018 //  $Date: 2010/08/09 $
00019 //  $State: Exp $
00020 // *****************************************************************************
00021 // *****************************************************************************
00022 
00023 
00024 
00025 #if !defined(oaDMTypes_P)
00026 #define oaDMTypes_P
00027 
00028 // *****************************************************************************
00029 // Header Files.
00030 // *****************************************************************************
00031 #include "oaString.h"
00032 
00033 
00034 
00035 // *****************************************************************************
00036 // System includes.
00037 // *****************************************************************************
00038 #include <limits.h>
00039 
00040 BEGIN_OA_NAMESPACE
00041 
00042 
00043 
00044 // *****************************************************************************
00045 // Windows DLL export macros
00046 // *****************************************************************************
00047 #if defined(OA_WINDOWS) && defined(OA_DM_DLL_EXPORTS)
00048 #define OA_DM_DLL_API __declspec(dllexport)
00049 #define OA_DM_DLL_PVT __declspec(dllexport)
00050 #define OA_DM_DLL_EXTERN
00051 #elif defined(OA_WINDOWS) && !defined(OA_STATIC)
00052 #define OA_DM_DLL_API __declspec(dllimport)
00053 #define OA_DM_DLL_PVT __declspec(dllimport)
00054 #define OA_DM_DLL_EXTERN extern
00055 #else
00056 #define OA_DM_DLL_API
00057 #define OA_DM_DLL_PVT
00058 #endif
00059 
00060 
00061 
00062 // *****************************************************************************
00063 // oaLibDataTypeEnum
00064 //
00065 // The first two entries are special datatypes that are used for the database
00066 // itself and for all oaAppObjects in the database. The next twelve entries are
00067 // reserved and are common to all databases.  Note that the dataID array for
00068 // dataTbls -- oaLibData::dmDataTblIDs--should match this array.
00069 //
00070 // Note: the number of datatypes should not include the special datatype:
00071 // oacDMLibDataType.
00072 // *****************************************************************************
00073 #define oavNumLibDataTypes              19
00074 #define oavNumNewLibDataTypes           2
00075 #define oavNumVarLibDataTypes           2
00076 
00077 enum oaLibDataTypeEnum {
00078     oacLibDataType                      = UINT_MAX,
00079     oacLibAppObjectDataType             = UINT_MAX - 1, // Included for base compatibility only.
00080     oacLibPropDataType                  = 0,
00081     oacLibGroupDataType                 = 1,
00082     oacLibGroupMemDataType              = 2,
00083     oacLibAvatarDataType                = 3,    // Included for base compatibility only.
00084     oacLibValueDataType                 = 4,    // Included for base compatibility only.
00085     oacLibConstraintParamDefDataType    = 5,    // Included for base compatibility only.
00086     oacLibConstraintParamDataType       = 6,    // Included for base compatibility only.
00087     oacLibConstraintDefDataType         = 7,    // Included for base compatibility only.
00088     oacLibConstraintDataType            = 8,    // Included for base compatibility only.
00089     oacLibConstraintGroupDataType       = 9,    // Included for base compatibility only.
00090     oacLibConstraintGroupMemDataType    = 10,   // Included for base compatibility only.
00091     oacLibConstraintGroupHeaderDataType = 11,   // Included for base compatibility only.
00092 
00093     oacCellDataType                     = 12,
00094     oacViewDataType                     = 13,
00095     oacCellViewDataType                 = 14,
00096     oacDMFileDataType                   = 15,
00097     oacLibFeatureDataType               = 16,   // Included for base compatibility only.
00098     oacLibFeaturePolicyDataType         = 17,   // Included for base compatibility only.
00099     oacLibGroupDefDataType              = 18
00100 };
00101 
00102 
00103 
00104 // *****************************************************************************
00105 // oaLibDataType
00106 // *****************************************************************************
00107 class OA_DM_DLL_API oaLibDataType {
00108 public:
00109                             oaLibDataType(oaLibDataTypeEnum valueIn);
00110                             oaLibDataType(const oaString &name);
00111                             ~oaLibDataType();
00112 
00113     const oaString          &getName() const;
00114 
00115                             operator                oaLibDataTypeEnum() const;
00116 
00117 private:
00118     static const oaString   *initNames();
00119 
00120     oaLibDataTypeEnum       value;
00121 
00122     static const oaString   names[];
00123     static const oaString   varNames[];
00124 };
00125 
00126 
00127 
00128 // *****************************************************************************
00129 // oaDMDataTypeEnum
00130 //
00131 // The first two entries are special datatypes that are used for the database
00132 // itself and for all oaAppObjects in the database. The next three entries are
00133 // reserved and are common to all databases.  Note that the dataID array for
00134 // dataTbls -- oaLibData::dmDataTblIDs--should match this array.
00135 //
00136 // Note: the number of datatypes should not include the special datatype:
00137 // oacDMLibDataType.
00138 // *****************************************************************************
00139 #define oavNumDMDataTypes               15
00140 #define oavNumNewDMDataTypes            2
00141 #define oavNumVarDMDataTypes            2
00142 
00143 enum oaDMDataTypeEnum {
00144     oacDMDataDataType                   = UINT_MAX,
00145     oacDMAppObjectDataType              = UINT_MAX - 1,
00146     oacDMPropDataType                   = 0,
00147     oacDMGroupDataType                  = 1,
00148     oacDMGroupMemDataType               = 2,
00149     oacDMAvatarDataType                 = 3,    // Included for base compatibility only.
00150     oacDMValueDataType                  = 4,    // Included for base compatibility only.
00151     oacDMConstraintParamDefDataType     = 5,    // Included for base compatibility only.
00152     oacDMConstraintParamDataType        = 6,    // Included for base compatibility only.
00153     oacDMConstraintDefDataType          = 7,    // Included for base compatibility only.
00154     oacDMConstraintDataType             = 8,    // Included for base compatibility only.
00155     oacDMConstraintGroupDataType        = 9,    // Included for base compatibility only.
00156     oacDMConstraintGroupMemDataType     = 10,   // Included for base compatibility only.
00157     oacDMConstraintGroupHeaderDataType  = 11,   // Included for base compatibility only.
00158 
00159     oacDMFeatureDataType                = 12,
00160     oacDMFeaturePolicyDataType          = 13,
00161     oacDMGroupDefDataType               = 14
00162 };
00163 
00164 
00165 
00166 // *****************************************************************************
00167 // oaDMDataType
00168 // *****************************************************************************
00169 class OA_DM_DLL_API oaDMDataType {
00170 public:
00171                             oaDMDataType(oaDMDataTypeEnum valueIn);
00172                             oaDMDataType(const oaString &name);
00173                             ~oaDMDataType();
00174 
00175     const oaString          &getName() const;
00176 
00177                             operator                oaDMDataTypeEnum() const;
00178 
00179 private:
00180     static const oaString   *initNames();
00181 
00182     oaDMDataTypeEnum        value;
00183 
00184     static const oaString   names[];
00185     static const oaString   varNames[];
00186 };
00187 
00188 
00189 
00190 // *****************************************************************************
00191 // Status bits for Version Control queries on DM objects
00192 // *****************************************************************************
00193 #define oacVCStatusControlled   0x00000001u
00194 #define oacVCStatusEditable     0x00000002u
00195 #define oacVCStatusUpToDate     0x00000004u
00196 #define oacVCStatusAdded        0x00000008u
00197 #define oacVCStatusDeleted      0x00000010u
00198 #define oacVCStatusModified     0x00000020u
00199 #define oacVCStatusLocked       0x00000040u
00200 #define oacVCStatusMerged       0x00000080u
00201 #define oacVCStatusConflict     0x00000100u
00202 #define oacVCStatusMissing      0x00000200u
00203 #define oacVCStatusRemote       0x00000400u
00204 
00205 #define oacVCStatusAll          0xFFFFFFFFu
00206 
00207 
00208 
00209 // *****************************************************************************
00210 // Forward Private Class Declarations
00211 // *****************************************************************************
00212 class oaCellViewTbl;
00213 class oaViewTbl;
00214 class oaClient;
00215 class oaDMFileTbl;
00216 class oaDMStaticVarMemory;
00217 class oaLibHashTbl;
00218 class oaLibData;
00219 class oaLibDefListTbl;
00220 class oaLibDefListMemTbl;
00221 class oaDMDataTbl;
00222 class oaDMILink;
00223 class oaDMAccess;
00224 class oaVCSystemPvt;
00225 class oaVCVersionPvt;
00226 class oaDMDataHashTbl;
00227 
00228 
00229 
00230 // *****************************************************************************
00231 // Forward Public Class Declarations
00232 // *****************************************************************************
00233 class oaLibDefAttrIter;
00234 class oaDMData;
00235 class oaDMObject;
00236 class oaLib;
00237 class oaLibDefList;
00238 class oaLibDefListMem;
00239 class oaLibDef;
00240 class oaLibDefListRef;
00241 class oaCell;
00242 class oaView;
00243 class oaCellView;
00244 class oaDMFile;
00245 class oaServer;
00246 class oaVCSystem;
00247 class oaVCVersion;
00248 
00249 
00250 
00251 // *****************************************************************************
00252 // Initialization Function Declaration
00253 // *****************************************************************************
00254 OA_DM_DLL_API extern void
00255 oaDMInit(oaUInt4    apiMajorRev = oacAPIMajorRevNumber,
00256          oaUInt4    apiMinorRev = oacAPIMinorRevNumber);
00257 
00258 OA_DM_DLL_API extern void
00259 oaDMInit(oaUInt4    apiMajorRev,
00260          oaUInt4    apiMinorRev,
00261          oaUInt4    dataModelRev);
00262 
00263 
00264 
00265 END_OA_NAMESPACE
00266 
00267 #endif

Return to top of page