oaViaParam.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaViaParam.h
00004 //
00005 // This file contains the definitions for the oaViaParam class and its public
00006 // supporting classes. The oaViaParam is used for specified the parameters to
00007 // oaStdViaDef and oaStdVia.
00008 //
00009 //  oaViaParamType
00010 //      This class implements an enumerated type that identifies each parameter
00011 //      field in the oaViaParam.
00012 //
00013 // *****************************************************************************
00014 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00015 // Integration Initiative, this material may not be copied, modified,
00016 // re-published, uploaded, executed, or distributed in any way, in any medium,
00017 // in whole or in part, without prior written permission from Cadence.
00018 //
00019 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00020 //                           All Rights Reserved.
00021 //
00022 //  $Author: icftcm $
00023 //  $Revision: #1 $
00024 //  $Date: 2010/08/09 $
00025 //  $State: Exp $
00026 // *****************************************************************************
00027 // *****************************************************************************
00028 
00029 
00030 
00031 #if !defined(oaViaParam_P)
00032 #define oaViaParam_P
00033 
00034 
00035 
00036 // *****************************************************************************
00037 // Nested includes
00038 // *****************************************************************************
00039 #include "oaVector.h"
00040 #include "oaTechDBTypes.h"
00041 
00042 
00043 
00044 // *****************************************************************************
00045 // Declare and define types in the OpenAccess namespace.
00046 // *****************************************************************************
00047 BEGIN_OA_NAMESPACE
00048 
00049 
00050 // *****************************************************************************
00051 // oaViaParamTypeEnum
00052 // *****************************************************************************
00053 #define oavNumViaParamTypes     14
00054 
00055 enum oaViaParamTypeEnum {
00056     oacLayer1EncViaParamType    = 0,
00057     oacLayer2EncViaParamType    = 1,
00058     oacImplant1EncViaParamType  = 2,
00059     oacImplant2EncViaParamType  = 3,
00060     oacLayer1OffsetViaParamType = 4,
00061     oacLayer2OffsetViaParamType = 5,
00062     oacCutSpacingViaParamType   = 6,
00063     oacOriginOffsetViaParamType = 7,
00064     oacCutSizeViaParamType      = 8, // This enumeration value is deprecated.
00065     oacCutLayerViaParamType     = 9,
00066     oacCutColumnsViaParamType   = 10,
00067     oacCutRowsViaParamType      = 11,
00068     oacCutWidthViaParamType     = 12,
00069     oacCutHeightViaParamType    = 13
00070 };
00071 
00072 
00073 
00074 // *****************************************************************************
00075 // oaViaParamType
00076 // *****************************************************************************
00077 class OA_TECH_DLL_API oaViaParamType {
00078 public:
00079                             oaViaParamType(oaViaParamTypeEnum valueIn);
00080                             oaViaParamType(const oaString &name);
00081                             ~oaViaParamType();
00082 
00083     const oaString          &getName() const;
00084 
00085                             operator                oaViaParamTypeEnum() const;
00086 
00087 private:
00088     oaViaParamTypeEnum      value;
00089 
00090     static const oaString   names[];
00091 };
00092 
00093 
00094 
00095 // *****************************************************************************
00096 // oaViaParam
00097 // *****************************************************************************
00098 class OA_TECH_DLL_API oaViaParam {
00099 public:
00100                             oaViaParam();
00101                             oaViaParam(const oaViaParam &paramIn);
00102                             ~oaViaParam();
00103 
00104     const oaVector          &getLayer1Enc() const;
00105     const oaVector          &getLayer2Enc() const;
00106     const oaVector          &getImplant1Enc() const;
00107     const oaVector          &getImplant2Enc() const;
00108     const oaVector          &getLayer1Offset() const;
00109     const oaVector          &getLayer2Offset() const;
00110     const oaVector          &getCutSpacing() const;
00111     const oaVector          &getOriginOffset() const;
00112     oaDist                  getCutWidth() const;
00113     oaDist                  getCutHeight() const;
00114     oaLayerNum              getCutLayer() const;
00115     oaUInt4                 getCutColumns() const;
00116     oaUInt4                 getCutRows() const;
00117     oaBoolean               getCutPatternVal(oaUInt4    cutRowNum,
00118                                              oaUInt4    cutColNum) const;
00119 
00120     oaBoolean               hasDefaultCutPattern() const;
00121 
00122     void                    setLayer1Enc(const oaVector &layer1Enc);
00123     void                    setLayer2Enc(const oaVector &layer2Enc);
00124     void                    setImplant1Enc(const oaVector &imp1Enc);
00125     void                    setImplant2Enc(const oaVector &imp2Enc);
00126     void                    setLayer1Offset(const oaVector &layer1Offset);
00127     void                    setLayer2Offset(const oaVector &layer2Offset);
00128     void                    setCutSpacing(const oaVector &cutSpacing);
00129     void                    setOriginOffset(const oaVector &originOffset);
00130     void                    setCutWidth(oaDist width);
00131     void                    setCutHeight(oaDist height);
00132     void                    setCutLayer(oaLayerNum cutLayer);
00133     void                    setCutColumns(oaUInt4 cutColumns);
00134     void                    setCutRows(oaUInt4 cutRows);
00135     void                    setDefaultCutPattern();
00136     void                    setCutPatternVal(oaUInt4    cutRowNum,
00137                                              oaUInt4    cutColNum,
00138                                              oaBoolean  val);
00139 
00140     oaBoolean               hasDefault(oaViaParamType paramType) const;
00141     oaBoolean               hasAnyDefaults() const;
00142     void                    setDefault(oaViaParamType paramType);
00143     void                    setAllNonDefault();
00144 
00145     oaBoolean               isEqual(const oaViaParam &params) const;
00146 
00147     oaViaParam              &operator=(const oaViaParam &params);
00148 
00149     oaBoolean               operator==(const oaViaParam &param) const;
00150     oaBoolean               operator!=(const oaViaParam &param) const;
00151 
00152 private:
00153     void                    allocCutPattern(oaUInt4 sizeIn);
00154     void                    freeCutPattern();
00155 
00156     oaVector                layer1Enc;
00157     oaVector                layer2Enc;
00158     oaVector                imp1Enc;
00159     oaVector                imp2Enc;
00160     oaVector                layer1Offset;
00161     oaVector                layer2Offset;
00162     oaVector                cutSpacing;
00163     oaVector                originOffset;
00164     oaDist                  cutWidth;
00165     oaDist                  cutHeight;
00166     oaLayerNum              cutLayer;
00167     oaUInt4                 cutColumns;
00168     oaUInt4                 cutRows;
00169     oaUInt4                 flags;
00170     oaUInt4                 cutPatternSize;
00171     oaByte                  *cutPattern;
00172 
00173     friend class oaDesign;
00174     friend class oaStdVia;
00175     friend class oaStdViaHeader;
00176     friend class oaStdViaDef;
00177     friend class oaStdViaVariant;
00178 };
00179 
00180 
00181 
00182 END_OA_NAMESPACE
00183 
00184 #endif

Return to top of page