oaPurpose.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaPurpose.h
00004 //
00005 // This file contains the definition for the oaPurpose class and its public
00006 // supporting classes. The oaPurpose class defines a purpose, later referenced
00007 // when creating physical design data. A purpose consists of a purpose type,
00008 // a purpose name, and a purpose number.
00009 // The supporting classes include:
00010 //
00011 //  oaPurposeType
00012 //      This class implements an enumerated type that describes the purpose
00013 //      type.
00014 //
00015 // Each technology database will have a set of predefined purposes which
00016 // correspond to the eight oaPurpose types. These predefined purposes are
00017 // always available, and may not be changed nor removed. This set of predefined
00018 // purposes is as follows:
00019 //
00020 // Type                         Name            Number
00021 //
00022 // oacDrawingPurposeType        "drawing"       oavPurposeNumberDrawing
00023 // oacFillPurposeType           "fill"          oavPurposeNumberFill
00024 // oacSlotPurposeType           "slot"          oavPurposeNumberSlot
00025 // oacOPCSerifPurposeType       "OPCSerif"      oavPurposeNumberOPCSerif
00026 // oacOPCAntiSerifPurposeType   "OPCAntiSerif"  oavPurposeNumberOPCAntiSerif
00027 // oacAnnotationPurposeType     "annotation"    oavPurposeNumberAnnotation
00028 // oacGapFillPurposeType        "gapFill"       oavPurposeNumberGapFill
00029 // oacRedundantPurposeType      "redundant"     oavPurposeNumberRedundant
00030 // oacAnyPurposeType            "oaAny"         oavPurposeNumberAny
00031 // oacNoPurposeType             "oaNo"          oavPurposeNumberNo
00032 // oacFillOPCPurposeType        "oaFillOPC"     oavPurposeNumberFillOPC
00033 //
00034 // Additional purposes which are added into the tech database by users will be
00035 // of type oacDrawingPurposeType.
00036 //
00037 // *****************************************************************************
00038 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00039 // Integration Initiative, this material may not be copied, modified,
00040 // re-published, uploaded, executed, or distributed in any way, in any medium,
00041 // in whole or in part, without prior written permission from Cadence.
00042 //
00043 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00044 //                           All Rights Reserved.
00045 //
00046 //  $Author: icftcm $
00047 //  $Revision: #1 $
00048 //  $Date: 2010/08/09 $
00049 //  $State: Exp $
00050 // *****************************************************************************
00051 // *****************************************************************************
00052 
00053 
00054 
00055 #if !defined(oaPurpose_P)
00056 #define oaPurpose_P
00057 
00058 
00059 
00060 // *****************************************************************************
00061 // Nested includes
00062 // *****************************************************************************
00063 #include "oaTech.h"
00064 
00065 
00066 
00067 // *****************************************************************************
00068 // Declare and define types in the OpenAccess namespace.
00069 // *****************************************************************************
00070 BEGIN_OA_NAMESPACE
00071 
00072 
00073 
00074 // *****************************************************************************
00075 // Default Purpose Number defines.
00076 // *****************************************************************************
00077 #define oavPurposeNumberDrawing         0xffffffffu
00078 #define oavPurposeNumberFill            0xfffffffeu
00079 #define oavPurposeNumberSlot            0xfffffffdu
00080 #define oavPurposeNumberOPCSerif        0xfffffffcu
00081 #define oavPurposeNumberOPCAntiSerif    0xfffffffbu
00082 #define oavPurposeNumberAnnotation      0xfffffffau
00083 #define oavPurposeNumberGapFill         0xfffffff9u
00084 #define oavPurposeNumberRedundant       0xfffffff8u
00085 #define oavPurposeNumberAny             0xfffffff7u
00086 #define oavPurposeNumberNo              0xfffffff6u
00087 #define oavPurposeNumberFillOPC         0xfffffff5u
00088 
00089 
00090 
00091 // *****************************************************************************
00092 // oaPurposeTypeEnum
00093 // *****************************************************************************
00094 #define oavNumPurposeTypes              11
00095 
00096 enum oaPurposeTypeEnum {
00097     oacDrawingPurposeType       = 0,
00098     oacFillPurposeType          = 1,
00099     oacSlotPurposeType          = 2,
00100     oacOPCSerifPurposeType      = 3,
00101     oacOPCAntiSerifPurposeType  = 4,
00102     oacAnnotationPurposeType    = 5,
00103     oacGapFillPurposeType       = 6,
00104     oacRedundantPurposeType     = 7,
00105     oacAnyPurposeType           = 8,
00106     oacNoPurposeType            = 9,
00107     oacFillOPCPurposeType       = 10
00108 };
00109 
00110 
00111 
00112 // *****************************************************************************
00113 // oaPurposeType
00114 // *****************************************************************************
00115 class OA_TECH_DLL_API oaPurposeType {
00116 public:
00117                                 oaPurposeType(oaPurposeTypeEnum valueIn);
00118                                 oaPurposeType(const oaString &name);
00119                                 ~oaPurposeType();
00120 
00121     const oaString              &getName() const;
00122 
00123                                 operator                    oaPurposeTypeEnum() const;
00124 
00125     static oaPurposeTypeEnum    get(oaPurposeNum purposeNum);
00126 
00127 private:
00128     static const oaString       *initNames();
00129 
00130     oaPurposeTypeEnum           value;
00131 
00132     static const oaString       names[];
00133 };
00134 
00135 
00136 
00137 // *****************************************************************************
00138 // oaPurpose
00139 // *****************************************************************************
00140 class OA_TECH_DLL_API oaPurpose : public oaTechObject {
00141 public:
00142     static oaPurpose        *create(oaTech          *tech,
00143                                     const oaString  &name,
00144                                     oaPurposeNum    number);
00145 
00146     static oaPurpose        *find(const oaTech      *tech,
00147                                   const oaString    &name);
00148     static oaPurpose        *find(const oaTech  *tech,
00149                                   oaPurposeNum  number);
00150     static oaPurpose        *find(const oaTech      *tech,
00151                                   const oaString    &name,
00152                                   oaBoolean         local);
00153     static oaPurpose        *find(const oaTech  *tech,
00154                                   oaPurposeNum  number,
00155                                   oaBoolean     local);
00156 
00157     static oaPurpose        *get(oaTech         *tech,
00158                                  oaPurposeType  type);
00159 
00160     void                    destroy();
00161 
00162     oaPurposeNum            getNumber() const;
00163     void                    getName(oaString &name) const;
00164     oaPurposeType           getPurposeType() const;
00165 
00166     oaBoolean               isReserved() const;
00167 
00168     void                    setNumber(oaPurposeNum number);
00169     void                    setName(const oaString &name);
00170 
00171     enum {dtIndex = oacPurposeDataType};
00172 };
00173 
00174 
00175 
00176 // *****************************************************************************
00177 // oaTech traits
00178 // *****************************************************************************
00179 template<>
00180 class oaTraits<oaPurpose> {
00181 public:
00182     typedef oaTechObject            parentType;
00183     typedef oaPurposeModTypeEnum    modTypeType;
00184     enum {dbType = oacTechDBType};
00185     enum {domain = oacNoDomain};
00186     enum {isMultiDomain = false};
00187     enum {dtIndex = oacPurposeDataType};
00188     enum {isConcrete = true};
00189     enum {objectTypeEnumVal = oacPurposeType};
00190     enum {dataTypeEnumVal = oacPurposeDataType};
00191 };
00192 
00193 
00194 
00195 END_OA_NAMESPACE
00196 
00197 #endif

Return to top of page