oaSpfNS.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // oaSpfNS.h
00003 //
00004 // This file contains the definition for the oaSpfNS class. This class
00005 // implements the SPF NameSpace used in name mapping.  In conjunction with
00006 // the oaName object, the oaSpfNS class facilitates mapping names to and from
00007 // SPF.
00008 //
00009 // Note: At this time the SPF NameSpace does not support vectored, stepped,
00010 // or bundled names. This nameSpace is case sensitive, with programmable bus
00011 // and hierarchy characters.
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(oaSpfNS_P)
00032 #define oaSpfNS_P
00033 
00034 
00035 
00036 // *****************************************************************************
00037 // Nested includes
00038 // *****************************************************************************
00039 #include "oaName.h"
00040 
00041 
00042 
00043 // *****************************************************************************
00044 // Declare and define types in the OpenAccess namespace.
00045 // *****************************************************************************
00046 BEGIN_OA_NAMESPACE
00047 
00048 
00049 
00050 // *****************************************************************************
00051 // oaSpfNS
00052 // *****************************************************************************
00053 class OA_BASE_DLL_API oaSpfNS : public oaNameSpace {
00054 public:
00055                             oaSpfNS();
00056 
00057     virtual oaBoolean       isEqual(const oaScalarName  &n1,
00058                                     const oaScalarName  &n2) const;
00059     virtual oaBoolean       isEqual(const oaVectorName  &n1,
00060                                     const oaVectorName  &n2) const;
00061     virtual oaBoolean       isEqual(const oaVectorBitName   &n1,
00062                                     const oaVectorBitName   &n2) const;
00063     virtual oaBoolean       isEqual(const oaBundleName  &n1,
00064                                     const oaBundleName  &n2) const;
00065     virtual oaBoolean       isEqual(const oaSimpleName  &n1,
00066                                     const oaSimpleName  &n2) const;
00067     virtual oaBoolean       isEqual(const oaName    &n1,
00068                                     const oaName    &n2) const;
00069 
00070     virtual oaNameType      getType(const oaChar *in) const;
00071 
00072     void                    setOpenBusChar(oaChar c);
00073     void                    setCloseBusChar(oaChar c);
00074     void                    setHierDelimiter(oaChar c);
00075     void                    setPinDelimiter(oaChar c);
00076 
00077     oaChar                  getHierDelimiter() const;
00078     oaChar                  getOpenBusChar() const;
00079     oaChar                  getCloseBusChar() const;
00080     oaChar                  getPinDelimiter() 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                  scalarOnly;
00144 };
00145 
00146 
00147 
00148 END_OA_NAMESPACE
00149 
00150 #endif

Return to top of page