00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaView.h 00004 // 00005 // This file contains the definition for the oaView class and its public 00006 // supporting classes. The oaView class implements an OpenAccess library view 00007 // object. The public supporting classes include: 00008 // 00009 // oaReservedViewType 00010 // 00011 // This enum wrapper class encapsulates the reserved viewTypes which are 00012 // available. This class may be used to get a predefined viewType. 00013 // 00014 // oaViewType 00015 // This session object represents the type of a view. The viewType is 00016 // represented by a string. There are 10 reserved viewTypes which represent OA 00017 // databases: "maskLayout", "schematic", "schematicSymbol", "netlist", 00018 // "oaHierDesign", "wafer", "verilogAMSText", "VHDLAMSText", "verilogText", 00019 // "VHDLText", and "verilogAText". 00020 // 00021 // ***************************************************************************** 00022 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00023 // Integration Initiative, this material may not be copied, modified, 00024 // re-published, uploaded, executed, or distributed in any way, in any medium, 00025 // in whole or in part, without prior written permission from Cadence. 00026 // 00027 // Copyright 2002-2005 Cadence Design Systems, Inc. 00028 // All Rights Reserved. 00029 // 00030 // $Author: icftcm $ 00031 // $Revision: #1 $ 00032 // $Date: 2010/08/09 $ 00033 // $State: Exp $ 00034 // ***************************************************************************** 00035 // ***************************************************************************** 00036 00037 00038 00039 #if !defined(oaView_P) 00040 #define oaView_P 00041 00042 00043 00044 // ***************************************************************************** 00045 // Nested includes 00046 // ***************************************************************************** 00047 #include "oaDMModTypes.h" 00048 #include "oaLib.h" 00049 00050 00051 00052 // ***************************************************************************** 00053 // Declare and define types in the OpenAccess namespace. 00054 // ***************************************************************************** 00055 BEGIN_OA_NAMESPACE 00056 00057 00058 00059 // ***************************************************************************** 00060 // oaReservedViewTypeEnum 00061 // ***************************************************************************** 00062 #define oavNumReservedViewTypes 16 00063 #define oavNumDesignViewTypes 5 00064 00065 enum oaReservedViewTypeEnum { 00066 oacMaskLayout = 0, 00067 oacSchematic = 1, 00068 oacSchematicSymbol = 2, 00069 oacNetlist = 3, 00070 oacWafer = 4, 00071 oacVerilogAMSText = 5, 00072 oacVHDLAMSText = 6, 00073 oacVerilogText = 7, 00074 oacVHDLText = 8, 00075 oacVerilogAText = 9, 00076 oacHierDesign = 10, 00077 oacSystemVerilogText = 11, 00078 oacSPECTREText = 12, 00079 oacSPICEText = 13, 00080 oacHSPICEText = 14, 00081 oacCDLText = 15 00082 }; 00083 00084 00085 00086 // ***************************************************************************** 00087 // oaReservedViewType 00088 // ***************************************************************************** 00089 class OA_DM_DLL_API oaReservedViewType { 00090 public: 00091 oaReservedViewType(oaReservedViewTypeEnum valueIn); 00092 oaReservedViewType(const oaString &name); 00093 ~oaReservedViewType(); 00094 00095 const oaString &getName() const; 00096 operator oaReservedViewTypeEnum() const; 00097 00098 private: 00099 static const oaString *initNames(); 00100 00101 oaReservedViewTypeEnum value; 00102 00103 static const oaString names[]; 00104 }; 00105 00106 00107 00108 // ***************************************************************************** 00109 // oaViewType 00110 // ***************************************************************************** 00111 class OA_DM_DLL_API oaViewType : public oaSessionObject { 00112 public: 00113 static oaViewType *create(const oaString &name); 00114 static oaViewType *find(const oaString &name); 00115 static oaViewType *get(oaReservedViewType type); 00116 00117 void getName(oaString &name) const; 00118 00119 static oaCollection<oaViewType, oaSession> getViewTypes(); 00120 }; 00121 00122 00123 00124 // ***************************************************************************** 00125 // oaView 00126 // ***************************************************************************** 00127 class OA_DM_DLL_API oaView : public oaDMContainer { 00128 public: 00129 static oaView *find(const oaLib *lib, 00130 const oaScalarName &name, 00131 const oaViewType *viewType); 00132 static oaView *get(const oaLib *lib, 00133 const oaScalarName &name, 00134 const oaViewType *viewType); 00135 00136 void destroy(); 00137 00138 void getName(oaScalarName &name) const; 00139 void getName(const oaNameSpace &ns, 00140 oaString &out) const; 00141 00142 oaViewType *getViewType() const; 00143 00144 oaCollection<oaCellView, oaView> getCellViews() const; 00145 00146 enum {dtIndex = oacViewDataType}; 00147 }; 00148 00149 00150 00151 // ***************************************************************************** 00152 // Traits 00153 // ***************************************************************************** 00154 template<> 00155 class oaTraits<oaView> { 00156 public: 00157 typedef oaDMContainer parentType; 00158 typedef oaViewModTypeEnum modTypeType; 00159 enum {dbType = oacLibDBType}; 00160 enum {domain = oacNoDomain}; 00161 enum {isMultiDomain = false}; 00162 enum {dtIndex = oacViewDataType}; 00163 enum {isConcrete = true}; 00164 enum {objectTypeEnumVal = oacViewType}; 00165 enum {dataTypeEnumVal = oacViewDataType}; 00166 }; 00167 00168 template<> 00169 class oaTraits<oaViewType> { 00170 public: 00171 typedef oaSessionObject parentType; 00172 enum {domain = oacNoDomain}; 00173 enum {isMultiDomain = false}; 00174 enum {dbType = oacBaseDBType}; 00175 enum {dtIndex = oacViewTypeDataType}; 00176 enum {isConcrete = true}; 00177 enum {objectTypeEnumVal = oacViewTypeType}; 00178 enum {dataTypeEnumVal = oacViewTypeDataType}; 00179 }; 00180 00181 00182 00183 END_OA_NAMESPACE 00184 00185 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.