oaViaHeader.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaViaHeader.h
00004 //
00005 // This file contains the definition for the oaViaHeader class and its public 
00006 // supporting classes.
00007 //
00008 //  oaViaHeader
00009 //      This base class implements an object that contains information about a
00010 //      particular viaDef and all of the vias that reference it. A viaHeader
00011 //      is an automatic object that is created and destroyed by the database.
00012 //      An oaViaHeader may be either a standard or custom viaHeader and is
00013 //      associated with standard or custom vias, respectively.
00014 //
00015 //      A viaHeader is automatically created whenever the first via of a
00016 //      viaDef is created. A viaHeader is destroyed when the last via
00017 //      associated with the viaDef is destroyed.
00018 //
00019 //  oaStdViaHeader
00020 //      This class implements a viaHeader that contains information about a
00021 //      standard viaDef and all of the standard vias in a design that use it.
00022 //      A standard via has a fixed number of parameters which can be set
00023 //      using an oaViaParam object.
00024 //
00025 //  oaCustomViaHeader
00026 //      This class implements a viaHeader that contains information about a
00027 //      custom viaDef and all of the custom vias in a design that use it. A
00028 //      custom via has a customizable set of parameters which can be set
00029 //      using an oaParamArray object.
00030 //
00031 //
00032 // *****************************************************************************
00033 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00034 // Integration Initiative, this material may not be copied, modified,
00035 // re-published, uploaded, executed, or distributed in any way, in any medium,
00036 // in whole or in part, without prior written permission from Cadence.
00037 //
00038 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00039 //                           All Rights Reserved.
00040 //
00041 //  $Author: icftcm $
00042 //  $Revision: #1 $
00043 //  $Date: 2010/08/09 $
00044 //  $State: Exp $
00045 // *****************************************************************************
00046 // *****************************************************************************
00047 
00048 
00049 
00050 #if !defined(oaViaHeader_P)
00051 #define oaViaHeader_P
00052 
00053 
00054 
00055 // *****************************************************************************
00056 // Nested includes
00057 // *****************************************************************************
00058 #include "oaParam.h"
00059 #include "oaViaDef.h"
00060 #include "oaDesignModTypes.h"
00061 #include "oaRefHeader.h"
00062 
00063 
00064 
00065 // *****************************************************************************
00066 // Declare and define types in the OpenAccess namespace.
00067 // *****************************************************************************
00068 BEGIN_OA_NAMESPACE
00069 
00070 
00071 
00072 // *****************************************************************************
00073 // oaViaHeader
00074 // *****************************************************************************
00075 class OA_DESIGN_DLL_API oaViaHeader : public oaRefHeader {
00076 public:
00077     static oaViaHeader                      *find(const oaBlock     *block,
00078                                                   const oaString    &viaDefName);
00079     static oaViaHeader                      *find(const oaBlock     *block,
00080                                                   const oaViaDef    *viaDef);
00081 
00082     oaViaDef                                *getViaDef() const;
00083     void                                    getViaDefName(oaString &name) const;
00084 
00085     oaCollection<oaVia, oaViaHeader>        getVias() const;
00086     oaCollection<oaViaHeader, oaViaHeader>  getSubHeaders() const;
00087 
00088     enum {dtIndex = oacViaHeaderDataType};
00089 };
00090 
00091 
00092 
00093 // *****************************************************************************
00094 // oaStdViaHeader
00095 // *****************************************************************************
00096 class OA_DESIGN_DLL_API oaStdViaHeader : public oaViaHeader {
00097 public:
00098     void                    getParams(oaViaParam &params) const;
00099 };
00100 
00101 
00102 
00103 // *****************************************************************************
00104 // oaCustomViaHeader
00105 // *****************************************************************************
00106 class OA_DESIGN_DLL_API oaCustomViaHeader : public oaViaHeader {
00107 public:
00108     void                    getLibName(oaScalarName &libName) const;
00109     void                    getCellName(oaScalarName &cellName) const;
00110     void                    getViewName(oaScalarName &viewName) const;
00111     void                    getLibName(const oaNameSpace    &ns,
00112                                        oaString             &libName) const;
00113     void                    getCellName(const oaNameSpace   &ns,
00114                                         oaString            &cellName) const;
00115     void                    getViewName(const oaNameSpace   &ns,
00116                                         oaString            &viewName) const;
00117     void                    getParams(oaParamArray &params) const;
00118     void                    getAllParams(oaParamArray &params) const;
00119 };
00120 
00121 
00122 
00123 // *****************************************************************************
00124 // Design Traits.
00125 // *****************************************************************************
00126 template<>
00127 class oaTraits<oaViaHeader> {
00128 public:
00129     typedef oaRefHeader             parentType;
00130     typedef oaViaHeaderModTypeEnum  modTypeType;
00131     enum {domain = oacBlockDomain};
00132     enum {dbType = oacDesignDBType};
00133     enum {isMultiDomain = false};
00134     enum {isConcrete = false};
00135     enum {dtIndex = oacViaHeaderDataType};
00136     enum {dataTypeEnumVal = oacViaHeaderDataType};
00137     enum {abstractTypeEnumVal = oacViaHeaderType};
00138 };
00139 
00140 template<>
00141 class oaTraits<oaStdViaHeader> {
00142 public:
00143     typedef oaViaHeaderModTypeEnum  modTypeType;
00144     typedef oaViaHeader             parentType;
00145     enum {dtIndex = oacViaHeaderDataType};
00146     enum {dataTypeEnumVal = oacViaHeaderDataType};
00147     enum {domain = oacBlockDomain};
00148     enum {dbType = oacDesignDBType};
00149     enum {isMultiDomain = false};
00150     enum {isConcrete = true};
00151     enum {objectTypeEnumVal = oacStdViaHeaderType};
00152 };
00153 
00154 template<>
00155 class oaTraits<oaCustomViaHeader> {
00156 public:
00157     typedef oaViaHeaderModTypeEnum  modTypeType;
00158     typedef oaViaHeader             parentType;
00159     enum {dtIndex = oacViaHeaderDataType};
00160     enum {dataTypeEnumVal = oacViaHeaderDataType};
00161     enum {domain = oacBlockDomain};
00162     enum {dbType = oacDesignDBType};
00163     enum {isMultiDomain = false};
00164     enum {isConcrete = true};
00165     enum {objectTypeEnumVal = oacCustomViaHeaderType};
00166 };
00167 
00168 
00169 
00170 END_OA_NAMESPACE
00171 
00172 #endif

Return to top of page