oaSpefNS.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // oaSpefNS.h
00003 //
00004 // This file contains the definition for the oaSpefNS class. This class
00005 // implements the SPEF NameSpace used in name mapping.  In conjunction with
00006 // the oaName object, the oaSpefNS class facilitates mapping names to and from
00007 // SPEF.
00008 //
00009 // Note: At this time the SPEF NameSpace does not support vectored, stepped,
00010 // or bundled names.  This nameSpace is case sensitive, with programmable bus,
00011 // pin and hierarchy characters. Although the pin delimiter is supported, it is
00012 // interpretted as a hierarchy character, and will be output as a hierarchy
00013 // character in the get() methods.
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(oaSpefNS_P)
00034 #define oaSpefNS_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 // oaSpefNS
00054 // *****************************************************************************
00055 class OA_BASE_DLL_API oaSpefNS : public oaNameSpace {
00056 public:
00057                             oaSpefNS();
00058 
00059     virtual oaBoolean       isEqual(const oaScalarName  &n1,
00060                                     const oaScalarName  &n2) const;
00061     virtual oaBoolean       isEqual(const oaVectorName  &n1,
00062                                     const oaVectorName  &n2) const;
00063     virtual oaBoolean       isEqual(const oaVectorBitName   &n1,
00064                                     const oaVectorBitName   &n2) const;
00065     virtual oaBoolean       isEqual(const oaBundleName  &n1,
00066                                     const oaBundleName  &n2) const;
00067     virtual oaBoolean       isEqual(const oaSimpleName  &n1,
00068                                     const oaSimpleName  &n2) const;
00069     virtual oaBoolean       isEqual(const oaName    &n1,
00070                                     const oaName    &n2) const;
00071 
00072     virtual oaNameType      getType(const oaChar *in) const;
00073 
00074     void                    setOpenBusChar(oaChar c);
00075     void                    setHierDelimiter(oaChar c);
00076     void                    setPinDelimiter(oaChar c);
00077 
00078     oaChar                  getHierDelimiter() const;
00079     oaChar                  getPinDelimiter() const;
00080     oaChar                  getOpenBusChar() const;
00081 
00082 private:
00083     virtual oaBoolean       isEqual(const oaNameMem &n1,
00084                                     const oaNameMem &n2) const;
00085     virtual oaBoolean       isEqual(const oaVectorName      &n1,
00086                                     const oaVectorBitName   &n2) const;
00087 
00088     virtual void            getInternalMember(const oaChar  *in,
00089                                               oaString      &out,
00090                                               oaBoolean     &caseSensitive,
00091                                               oaUInt4       len,
00092                                               oaUInt4       flags = 0) const;
00093     virtual void            getInternalScalar(const oaChar  *in,
00094                                               oaScalarName  &out) const;
00095     virtual void            getInternalVBit(const oaChar    *in,
00096                                             oaVectorBitName &out,
00097                                             oaBoolean       baseOnly = false) const;
00098     virtual void            getInternalVector(const oaChar  *in,
00099                                               oaVectorName  &out,
00100                                               oaBoolean     baseOnly = false) const;
00101 
00102     virtual void            getMember(const oaChar  *in,
00103                                       oaBoolean     caseSensitive,
00104                                       oaString      &out,
00105                                       oaUInt4       &loc,
00106                                       oaUInt4       flags = 0) const;
00107     virtual void            getMemberArray(const oaNameMem  *in,
00108                                            oaUInt4          numMembers,
00109                                            oaString         &out,
00110                                            oaUInt4          &loc) const;
00111     virtual void            getScalarName(const oaScalarName    &in,
00112                                           oaString              &out,
00113                                           oaUInt4               &loc) const;
00114     virtual void            getVectorName(const oaVectorName    &in,
00115                                           oaString              &out,
00116                                           oaUInt4               &loc) const;
00117     virtual void            getVectorBitName(const oaVectorBitName  &in,
00118                                              oaString               &out,
00119                                              oaUInt4                &loc) const;
00120     virtual void            getVectorBitName(const oaNameMem    *in,
00121                                              oaUInt4            numMembers,
00122                                              oaUInt4            start,
00123                                              oaString           &out,
00124                                              oaUInt4            &loc) const;
00125 
00126     virtual void            get(const oaByte    *data,
00127                                 oaString        &out,
00128                                 oaUInt4         &loc) const;
00129 
00130     oaBoolean               isNormalChar(oaChar c) const;
00131     oaBoolean               isBusChar(oaChar c) const;
00132     oaBoolean               isHexDelimiter(oaChar c) const;
00133     oaBoolean               isEscChar(oaChar c) const;
00134     oaBoolean               isEscapableChar(oaChar c) const;
00135     oaBoolean               isHierChar(oaChar c) const;
00136 
00137     oaChar                  hexDelimiter;
00138     oaChar                  openBus;
00139     oaChar                  closeBus;
00140     oaChar                  escDelimiter;
00141     oaChar                  hierDelimiter;
00142     oaChar                  pinDelimiter;
00143     oaChar                  useCloseBus;
00144 };
00145 
00146 
00147 
00148 END_OA_NAMESPACE
00149 
00150 #endif

Return to top of page