oaLefDefNS.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // oaLefDefNS.h
00003 //
00004 // This file contains the definition for the oaLefNS and oaDefNS classes. These
00005 // classes implement the LEF and DEF NameSpace used in name mapping.  In
00006 // conjunction with the oaName object, the oaLefNS and oaDefNS classes
00007 // facilitate mapping names to and from LEF and DEF.
00008 //
00009 // Note: At this time neither the LEF nor DEF NameSpaces support vectored or
00010 // stepped or bundled names.  LEF does not support hierarchical names.  Both
00011 // nameSpaces are case sensitive, with programmable bus characters.
00012 // Additionally DEF has a programmable hierarchy character.  Since LEF and
00013 // DEF keywords are position sensitive, they are valid as names.
00014 //
00015 // *****************************************************************************
00016 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00017 // Integration Initiative, this material may not be copied, modified,
00018 // re-published, uploaded, executed, or distributed in any way, in any medium,
00019 // in whole or in part, without prior written permission from Cadence.
00020 //
00021 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00022 //                           All Rights Reserved.
00023 //
00024 //  $Author: icftcm $
00025 //  $Revision: #1 $
00026 //  $Date: 2010/08/09 $
00027 //  $State: Exp $
00028 // *****************************************************************************
00029 // *****************************************************************************
00030 
00031 
00032 
00033 #if !defined(oaLefDefNS_P)
00034 #define oaLefDefNS_P
00035 
00036 
00037 
00038 // *****************************************************************************
00039 // Nested includes
00040 // *****************************************************************************
00041 #include "oaName.h"
00042 
00043 
00044 
00045 // *****************************************************************************
00046 // Declare and define types in the OpenAccess namespace.
00047 // *****************************************************************************
00048 BEGIN_OA_NAMESPACE
00049 
00050 
00051 
00052 // *****************************************************************************
00053 // Forward Public Class Declarations
00054 // *****************************************************************************
00055 class oaVectorName;
00056 class oaScalarName;
00057 class oaVectorBitName;
00058 class oaBundleName;
00059 class oaSimpleName;
00060 class oaName;
00061 class oaNameMem;
00062 class oaNameType;
00063 class oaString;
00064 
00065 
00066 
00067 // *****************************************************************************
00068 // oaLefNS
00069 // *****************************************************************************
00070 class OA_BASE_DLL_API oaLefNS : public oaNameSpace {
00071 public:
00072                             oaLefNS();
00073 
00074     virtual oaBoolean       isEqual(const oaScalarName  &n1,
00075                                     const oaScalarName  &n2) const;
00076     virtual oaBoolean       isEqual(const oaVectorName  &n1,
00077                                     const oaVectorName  &n2) const;
00078     virtual oaBoolean       isEqual(const oaVectorBitName   &n1,
00079                                     const oaVectorBitName   &n2) const;
00080     virtual oaBoolean       isEqual(const oaBundleName  &n1,
00081                                     const oaBundleName  &n2) const;
00082     virtual oaBoolean       isEqual(const oaSimpleName  &n1,
00083                                     const oaSimpleName  &n2) const;
00084     virtual oaBoolean       isEqual(const oaName    &n1,
00085                                     const oaName    &n2) const;
00086 
00087     virtual oaNameType      getType(const oaChar *in) const;
00088 
00089     void                    setOpenBusChar(oaChar c);
00090     void                    setCloseBusChar(oaChar c);
00091     void                    setHierDelimiter(oaChar c);
00092 
00093     oaChar                  getHierDelimiter() const;
00094     oaChar                  getOpenBusChar() const;
00095     oaChar                  getCloseBusChar() const;
00096 
00097 protected:
00098     virtual oaBoolean       isEqual(const oaNameMem &n1,
00099                                     const oaNameMem &n2) const;
00100     virtual oaBoolean       isEqual(const oaVectorName      &n1,
00101                                     const oaVectorBitName   &n2) const;
00102 
00103     virtual void            getInternalMember(const oaChar  *in,
00104                                               oaString      &out,
00105                                               oaBoolean     &cs,
00106                                               oaUInt4       len,
00107                                               oaUInt4       flags = 0) const;
00108     virtual void            getInternalScalar(const oaChar  *in,
00109                                               oaScalarName  &out) const;
00110     virtual void            getInternalVBit(const oaChar    *in,
00111                                             oaVectorBitName &out,
00112                                             oaBoolean       baseOnly = false) const;
00113     virtual void            getInternalVector(const oaChar  *in,
00114                                               oaVectorName  &out,
00115                                               oaBoolean     baseOnly = false) const;
00116 
00117     virtual void            getMember(const oaChar  *in,
00118                                       oaBoolean     caseSensitive,
00119                                       oaString      &out,
00120                                       oaUInt4       &loc,
00121                                       oaUInt4       flags = 0) const;
00122     virtual void            getMemberArray(const oaNameMem  *in,
00123                                            oaUInt4          numMembers,
00124                                            oaString         &out,
00125                                            oaUInt4          &loc) const;
00126     virtual void            getScalarName(const oaScalarName    &in,
00127                                           oaString              &out,
00128                                           oaUInt4               &loc) const;
00129     virtual void            getVectorName(const oaVectorName    &in,
00130                                           oaString              &out,
00131                                           oaUInt4               &loc) const;
00132     virtual void            getVectorBitName(const oaVectorBitName  &in,
00133                                              oaString               &out,
00134                                              oaUInt4                &loc) const;
00135     virtual void            getVectorBitName(const oaNameMem    *in,
00136                                              oaUInt4            numMembers,
00137                                              oaUInt4            start,
00138                                              oaString           &out,
00139                                              oaUInt4            &loc) const;
00140 
00141     virtual void            get(const oaByte    *data,
00142                                 oaString        &out,
00143                                 oaUInt4         &loc) const;
00144 
00145     oaBoolean               isNonPrintableChar(oaChar c) const;
00146     oaBoolean               isNormalChar(oaChar c) const;
00147     oaBoolean               isBusChar(oaChar c) const;
00148     oaBoolean               isHexDelimiter(oaChar c) const;
00149     oaBoolean               isEscChar(oaChar c) const;
00150     oaBoolean               isEscapableChar(oaChar c) const;
00151     oaBoolean               isHierChar(oaChar c) const;
00152 
00153 private:
00154 
00155     oaChar                  hexDelimiter;
00156     oaChar                  openBus;
00157     oaChar                  closeBus;
00158     oaChar                  escDelimiter;
00159     oaChar                  hierDelimiter;
00160 };
00161 
00162 
00163 
00164 // *****************************************************************************
00165 // oaDefNS
00166 // *****************************************************************************
00167 class OA_BASE_DLL_API oaDefNS : public oaLefNS {
00168 public:
00169     virtual oaBoolean       isEqual(const oaScalarName  &n1,
00170                                     const oaScalarName  &n2) const;
00171     virtual oaBoolean       isEqual(const oaVectorName  &n1,
00172                                     const oaVectorName  &n2) const;
00173     virtual oaBoolean       isEqual(const oaVectorBitName   &n1,
00174                                     const oaVectorBitName   &n2) const;
00175     virtual oaBoolean       isEqual(const oaBundleName  &n1,
00176                                     const oaBundleName  &n2) const;
00177     virtual oaBoolean       isEqual(const oaSimpleName  &n1,
00178                                     const oaSimpleName  &n2) const;
00179     virtual oaBoolean       isEqual(const oaName    &n1,
00180                                     const oaName    &n2) const;
00181 
00182 protected:
00183     virtual oaBoolean       isEqual(const oaNameMem &n1,
00184                                     const oaNameMem &n2) const;
00185     virtual oaBoolean       isEqual(const oaVectorName      &n1,
00186                                     const oaVectorBitName   &n2) const;
00187 
00188     virtual void            getInternalScalar(const oaChar  *in,
00189                                               oaScalarName  &out) const;
00190     virtual void            getInternalVBit(const oaChar    *in,
00191                                             oaVectorBitName &out,
00192                                             oaBoolean       baseOnly = false) const;
00193     virtual void            getInternalVector(const oaChar  *in,
00194                                               oaVectorName  &out,
00195                                               oaBoolean     baseOnly = false) const;
00196 
00197     virtual void            getMemberArray(const oaNameMem  *in,
00198                                            oaUInt4          numMembers,
00199                                            oaString         &out,
00200                                            oaUInt4          &loc) const;
00201     virtual void            getScalarName(const oaScalarName    &in,
00202                                           oaString              &out,
00203                                           oaUInt4               &loc) const;
00204     virtual void            getVectorName(const oaVectorName    &in,
00205                                           oaString              &out,
00206                                           oaUInt4               &loc) const;
00207     virtual void            getVectorBitName(const oaVectorBitName  &in,
00208                                              oaString               &out,
00209                                              oaUInt4                &loc) const;
00210     virtual void            getVectorBitName(const oaNameMem    *in,
00211                                              oaUInt4            numMembers,
00212                                              oaUInt4            start,
00213                                              oaString           &out,
00214                                              oaUInt4            &loc) const;
00215 
00216     virtual void            get(const oaByte    *data,
00217                                 oaString        &out,
00218                                 oaUInt4         &loc) const;
00219 };
00220 
00221 
00222 
00223 END_OA_NAMESPACE
00224 
00225 #endif

Return to top of page