00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaBoundary.h 00004 // 00005 // This file contains the definition for the oaBoundary, oaAreaBoundary, 00006 // oaPRBoundary, oaSnapBoundary and oaClusterBoundary classes and 00007 // their public supporting classes. 00008 // 00009 // ***************************************************************************** 00010 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00011 // Integration Initiative, this material may not be copied, modified, 00012 // re-published, uploaded, executed, or distributed in any way, in any medium, 00013 // in whole or in part, without prior written permission from Cadence. 00014 // 00015 // Copyright 2002-2008 Cadence Design Systems, Inc. 00016 // All Rights Reserved. 00017 // 00018 // $Author: icftcm $ 00019 // $Revision: #1 $ 00020 // $Date: 2010/08/09 $ 00021 // $State: Exp $ 00022 // ***************************************************************************** 00023 // ***************************************************************************** 00024 00025 00026 00027 #if !defined(oaBoundary_P) 00028 #define oaBoundary_P 00029 00030 00031 00032 // ***************************************************************************** 00033 // Nested includes 00034 // ***************************************************************************** 00035 #include "oaPointArray.h" 00036 #include "oaStringArray.h" 00037 #include "oaFig.h" 00038 #include "oaCluster.h" 00039 00040 00041 00042 // ***************************************************************************** 00043 // Declare and define types in the OpenAccess namespace. 00044 // ***************************************************************************** 00045 BEGIN_OA_NAMESPACE 00046 00047 00048 00049 // ***************************************************************************** 00050 // oaRowSpacingTypeEnum 00051 // ***************************************************************************** 00052 #define oavNumRowSpacingTypes 3 00053 00054 enum oaRowSpacingTypeEnum { 00055 oacEveryRowSpacingType = 0, 00056 oacEvenRowSpacingType = 1, 00057 oacOddRowSpacingType = 2 00058 }; 00059 00060 00061 00062 // ***************************************************************************** 00063 // oaRowSpacingType 00064 // ***************************************************************************** 00065 class OA_DESIGN_DLL_API oaRowSpacingType { 00066 public: 00067 oaRowSpacingType(oaRowSpacingTypeEnum typeIn); 00068 oaRowSpacingType(const oaString &name); 00069 00070 const oaString &getName() const; 00071 00072 operator oaRowSpacingTypeEnum() const; 00073 00074 private: 00075 oaRowSpacingTypeEnum type; 00076 00077 static const oaString names[]; 00078 }; 00079 00080 00081 00082 // ***************************************************************************** 00083 // oaRowFlipTypeEnum 00084 // ***************************************************************************** 00085 #define oavNumRowFlipTypes 3 00086 00087 enum oaRowFlipTypeEnum { 00088 oacNoRowFlipType = 0, 00089 oacEvenRowFlipType = 1, 00090 oacOddRowFlipType = 2 00091 }; 00092 00093 00094 00095 // ***************************************************************************** 00096 // oaRowFlipType 00097 // ***************************************************************************** 00098 class OA_DESIGN_DLL_API oaRowFlipType { 00099 public: 00100 oaRowFlipType(oaRowFlipTypeEnum typeIn); 00101 oaRowFlipType(const oaString &name); 00102 00103 const oaString &getName() const; 00104 00105 operator oaRowFlipTypeEnum() const; 00106 00107 private: 00108 oaRowFlipTypeEnum type; 00109 00110 static const oaString names[]; 00111 }; 00112 00113 00114 00115 // ***************************************************************************** 00116 // oaCoreBoxSpec 00117 // ***************************************************************************** 00118 class OA_DESIGN_DLL_API oaCoreBoxSpec { 00119 public: 00120 oaCoreBoxSpec(); 00121 oaCoreBoxSpec(const oaBox &bBox); 00122 oaCoreBoxSpec(const oaCoreBoxSpec &coreBoxSpec); 00123 00124 oaBox &getBBox(); 00125 const oaBox &getBBox() const; 00126 oaBoolean isRowHorizontal() const; 00127 oaOffset getRowSpacing() const; 00128 oaRowSpacingType getRowSpacingType() const; 00129 oaRowFlipType getRowFlipType() const; 00130 oaSiteDef *getSiteDef() const; 00131 void getSiteDefName(oaString &name); 00132 const oaString &getSiteDefName() const; 00133 00134 void setBBox(const oaBox &bBox); 00135 void setRowHorizontal(oaBoolean isHorizontal); 00136 void setRowSpacing(oaOffset spacing); 00137 void setRowSpacingType(oaRowSpacingType type); 00138 void setRowFlipType(oaRowFlipType flip); 00139 void setSiteDef(oaSiteDef *siteDef); 00140 void setSiteDef(const oaString &name); 00141 00142 oaUInt4 getNumRows() const; 00143 void getRowBBox(oaUInt4 rowNum, 00144 oaBox &bBox) const; 00145 00146 oaCoreBoxSpec &operator=(const oaCoreBoxSpec &coreBoxSpec); 00147 00148 oaBoolean operator==(const oaCoreBoxSpec &other) const; 00149 oaBoolean operator!=(const oaCoreBoxSpec &other) const; 00150 00151 private: 00152 00153 oaBox bBox; 00154 oaBoolean horizontal; 00155 oaOffset spacing; 00156 oaRowSpacingType spacingType; 00157 oaRowFlipType flipType; 00158 oaSiteDef *siteDef; 00159 oaString siteDefName; 00160 }; 00161 00162 00163 00164 // ***************************************************************************** 00165 // oaBoundary 00166 // ***************************************************************************** 00167 class OA_DESIGN_DLL_API oaBoundary : public oaFig { 00168 public: 00169 void getPoints(oaPointArray &points) const; 00170 #if !defined(OA_DEPRECATED) 00171 void getEdgeNames(oaString *edgeNamesIn) const; 00172 #endif 00173 oaUInt4 getNumEdges() const; 00174 oaBoolean hasDefaultConstraintGroup() const; 00175 oaConstraintGroup *getDefaultConstraintGroup() const; 00176 00177 #if !defined(OA_DEPRECATED) 00178 void setEdges(const oaPointArray &points, 00179 const oaString *edgeNames = NULL); 00180 #endif 00181 00182 void transform(oaDouble scale, 00183 oaDouble angle); 00184 00185 void getEdgeNames(oaStringArray &edgeNamesIn) const; 00186 void setEdges(const oaPointArray &points, 00187 const oaStringArray &edgeNames); 00188 00189 enum {dtIndex = oacBoundaryDataType}; 00190 }; 00191 00192 00193 00194 // ***************************************************************************** 00195 // oaAreaBoundary 00196 // ***************************************************************************** 00197 class OA_DESIGN_DLL_API oaAreaBoundary : public oaBoundary { 00198 public: 00199 #if !defined(OA_DEPRECATED) 00200 static oaAreaBoundary *create(oaBlock *block, 00201 const oaString &name, 00202 const oaPointArray &points, 00203 const oaString *edgeNames = NULL); 00204 static oaAreaBoundary *create(oaBlock *block, 00205 const oaPointArray &points, 00206 const oaString *edgeNames = NULL); 00207 #endif 00208 00209 static oaAreaBoundary *find(const oaBlock *block, 00210 const oaString &name); 00211 00212 void getName(oaString &name) const; 00213 00214 void setName(const oaString &name); 00215 00216 static oaAreaBoundary *create(oaBlock *block, 00217 const oaString &name, 00218 const oaPointArray &points, 00219 const oaStringArray &edgeNames); 00220 static oaAreaBoundary *create(oaBlock *block, 00221 const oaPointArray &points, 00222 const oaStringArray &edgeNames); 00223 }; 00224 00225 00226 00227 // ***************************************************************************** 00228 // oaPRBoundary 00229 // ***************************************************************************** 00230 class OA_DESIGN_DLL_API oaPRBoundary : public oaBoundary { 00231 public: 00232 #if !defined(OA_DEPRECATED) 00233 static oaPRBoundary *create(oaBlock *block, 00234 const oaPointArray &points, 00235 const oaString *edgeNames = NULL); 00236 #endif 00237 00238 static oaPRBoundary *find(const oaBlock *block); 00239 00240 oaBoolean hasCoreBoxSpec() const; 00241 oaBoolean hasIOBox() const; 00242 00243 void getCoreBoxSpec(oaCoreBoxSpec &spec) const; 00244 void getIOBox(oaBox &box) const; 00245 00246 void setCoreBoxSpec(const oaCoreBoxSpec &spec); 00247 void setIOBox(const oaBox &box); 00248 00249 void removeCoreBoxSpec(); 00250 void removeIOBox(); 00251 00252 oaCollection<oaBlockage, oaPRBoundary> getBlockagesOwnedBy() const; 00253 00254 static oaPRBoundary *create(oaBlock *block, 00255 const oaPointArray &points, 00256 const oaStringArray &edgeNames); 00257 }; 00258 00259 00260 00261 // ***************************************************************************** 00262 // oaSnapBoundary 00263 // ***************************************************************************** 00264 class OA_DESIGN_DLL_API oaSnapBoundary : public oaBoundary { 00265 public: 00266 #if !defined(OA_DEPRECATED) 00267 static oaSnapBoundary *create(oaBlock *block, 00268 const oaPointArray &bBox, 00269 const oaString *edgeNames = NULL); 00270 #endif 00271 00272 static oaSnapBoundary *find(const oaBlock *block); 00273 00274 static oaSnapBoundary *create(oaBlock *block, 00275 const oaPointArray &bBox, 00276 const oaStringArray &edgeNames); 00277 }; 00278 00279 00280 00281 // ***************************************************************************** 00282 // oaClusterBoundary 00283 // ***************************************************************************** 00284 class OA_DESIGN_DLL_API oaClusterBoundary : public oaBoundary { 00285 public: 00286 #if !defined(OA_DEPRECATED) 00287 static oaClusterBoundary *create(oaCluster *cluster, 00288 const oaString &name, 00289 const oaPointArray &points, 00290 const oaString *edgeNames = NULL); 00291 static oaClusterBoundary *create(oaCluster *cluster, 00292 const oaPointArray &points, 00293 const oaString *edgeNames = NULL); 00294 #endif 00295 00296 static oaClusterBoundary *find(const oaCluster *cluster, 00297 const oaString &name); 00298 00299 oaCluster *getCluster() const; 00300 00301 void getName(oaString &name) const; 00302 00303 void setName(const oaString &name); 00304 00305 static oaClusterBoundary *create(oaCluster *cluster, 00306 const oaString &name, 00307 const oaPointArray &points, 00308 const oaStringArray &edgeNames); 00309 static oaClusterBoundary *create(oaCluster *cluster, 00310 const oaPointArray &points, 00311 const oaStringArray &edgeNames); 00312 }; 00313 00314 00315 00316 // ***************************************************************************** 00317 // Design Traits. 00318 // ***************************************************************************** 00319 template<> 00320 class oaTraits<oaBoundary> { 00321 public: 00322 typedef oaFig parentType; 00323 typedef oaBoundaryModTypeEnum modTypeType; 00324 enum {domain = oacBlockDomain}; 00325 enum {dbType = oacDesignDBType}; 00326 enum {isMultiDomain = false}; 00327 enum {isConcrete = false}; 00328 enum {dtIndex = oacBoundaryDataType}; 00329 enum {dataTypeEnumVal = oacBoundaryDataType}; 00330 enum {abstractTypeEnumVal = oacBoundaryType}; 00331 }; 00332 00333 template<> 00334 class oaTraits<oaAreaBoundary> { 00335 public: 00336 typedef oaBoundaryModTypeEnum modTypeType; 00337 typedef oaBoundary parentType; 00338 enum {dtIndex = oacBoundaryDataType}; 00339 enum {dataTypeEnumVal = oacBoundaryDataType}; 00340 enum {domain = oacBlockDomain}; 00341 enum {dbType = oacDesignDBType}; 00342 enum {isMultiDomain = false}; 00343 enum {isConcrete = true}; 00344 enum {objectTypeEnumVal = oacAreaBoundaryType}; 00345 }; 00346 00347 template<> 00348 class oaTraits<oaPRBoundary> { 00349 public: 00350 typedef oaBoundaryModTypeEnum modTypeType; 00351 typedef oaBoundary parentType; 00352 enum {dtIndex = oacBoundaryDataType}; 00353 enum {dataTypeEnumVal = oacBoundaryDataType}; 00354 enum {domain = oacBlockDomain}; 00355 enum {dbType = oacDesignDBType}; 00356 enum {isMultiDomain = false}; 00357 enum {isConcrete = true}; 00358 enum {objectTypeEnumVal = oacPRBoundaryType}; 00359 }; 00360 00361 template<> 00362 class oaTraits<oaSnapBoundary> { 00363 public: 00364 typedef oaBoundaryModTypeEnum modTypeType; 00365 typedef oaBoundary parentType; 00366 enum {dtIndex = oacBoundaryDataType}; 00367 enum {dataTypeEnumVal = oacBoundaryDataType}; 00368 enum {domain = oacBlockDomain}; 00369 enum {dbType = oacDesignDBType}; 00370 enum {isMultiDomain = false}; 00371 enum {isConcrete = true}; 00372 enum {objectTypeEnumVal = oacSnapBoundaryType}; 00373 }; 00374 00375 template<> 00376 class oaTraits<oaClusterBoundary> { 00377 public: 00378 typedef oaBoundaryModTypeEnum modTypeType; 00379 typedef oaBoundary parentType; 00380 enum {dtIndex = oacBoundaryDataType}; 00381 enum {dataTypeEnumVal = oacBoundaryDataType}; 00382 enum {domain = oacBlockDomain}; 00383 enum {dbType = oacDesignDBType}; 00384 enum {isMultiDomain = false}; 00385 enum {isConcrete = true}; 00386 enum {objectTypeEnumVal = oacClusterBoundaryType}; 00387 }; 00388 00389 00390 00391 END_OA_NAMESPACE 00392 00393 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.