oaVhdlNS.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // oaVhdlNS.h
00003 //
00004 // This file contains the definition for the oaVhdlNS class. This class
00005 // implements the Vhdl NameSpace used in name mapping.  In conjunction with
00006 // the oaName object, the oaVhdlNS class facilitates mapping names to and from
00007 // Vhdl.
00008 //
00009 // Note: At this time the Vhdl NameSpace does not support stepped or bundled
00010 // names.  VHDL is case insensitive unless is it escaped, in which case it is
00011 // case sensitive.
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(oaVhdlNS_P)
00032 #define oaVhdlNS_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 // Forward Class Declarations
00052 // *****************************************************************************
00053 class oaKeywordTbl;
00054 class oaStringTbl;
00055 
00056 
00057 
00058 // *****************************************************************************
00059 // oaVhdlNS
00060 // *****************************************************************************
00061 class OA_BASE_DLL_API oaVhdlNS : public oaNameSpace {
00062 public:
00063                             oaVhdlNS();
00064                             oaVhdlNS(const oaVhdlNS &ns);
00065                             ~oaVhdlNS();
00066 
00067     oaVhdlNS                &operator=(const oaVhdlNS &ns);
00068 
00069     virtual oaBoolean       isEqual(const oaScalarName  &n1,
00070                                     const oaScalarName  &n2) const;
00071     virtual oaBoolean       isEqual(const oaVectorName  &n1,
00072                                     const oaVectorName  &n2) const;
00073     virtual oaBoolean       isEqual(const oaVectorBitName   &n1,
00074                                     const oaVectorBitName   &n2) const;
00075     virtual oaBoolean       isEqual(const oaBundleName  &n1,
00076                                     const oaBundleName  &n2) const;
00077     virtual oaBoolean       isEqual(const oaSimpleName  &n1,
00078                                     const oaSimpleName  &n2) const;
00079     virtual oaBoolean       isEqual(const oaName    &n1,
00080                                     const oaName    &n2) const;
00081 
00082     virtual oaNameType      getType(const oaChar *in) const;
00083 
00084 private:
00085     virtual oaBoolean       isEqual(const oaNameMem &n1,
00086                                     const oaNameMem &n2) const;
00087     virtual oaBoolean       isEqual(const oaVectorName      &n1,
00088                                     const oaVectorBitName   &n2) const;
00089 
00090     virtual void            getInternalMember(const oaChar  *in,
00091                                               oaString      &out,
00092                                               oaBoolean     &caseSensitive,
00093                                               oaUInt4       len,
00094                                               oaUInt4       flags = 0) const;
00095     virtual void            getInternalScalar(const oaChar  *in,
00096                                               oaScalarName  &out) const;
00097     virtual void            getInternalVBit(const oaChar    *in,
00098                                             oaVectorBitName &out,
00099                                             oaBoolean       baseOnly = false)
00100         const;
00101     virtual void            getInternalVector(const oaChar  *in,
00102                                               oaVectorName  &out,
00103                                               oaBoolean     baseOnly = false)
00104         const;
00105 
00106     virtual void            getMember(const oaChar  *in,
00107                                       oaBoolean     caseSensitive,
00108                                       oaString      &out,
00109                                       oaUInt4       &loc,
00110                                       oaUInt4       flags = 0) const;
00111     virtual void            getMemberArray(const oaNameMem  *in,
00112                                            oaUInt4          numMembers,
00113                                            oaString         &out,
00114                                            oaUInt4          &loc) const;
00115     virtual void            getVectorMember(const oaNameMem &in,
00116                                             oaUInt4         start,
00117                                             oaUInt4         stop,
00118                                             oaUInt4         step,
00119                                             oaString        &out,
00120                                             oaUInt4         &loc) const;
00121     virtual void            getScalarName(const oaScalarName    &in,
00122                                           oaString              &out,
00123                                           oaUInt4               &loc) const;
00124     virtual void            getVectorName(const oaVectorName    &in,
00125                                           oaString              &out,
00126                                           oaUInt4               &loc) const;
00127     virtual void            getVectorBitName(const oaVectorBitName  &in,
00128                                              oaString               &out,
00129                                              oaUInt4                &loc) const;
00130     virtual void            getVectorBitName(const oaNameMem    *in,
00131                                              oaUInt4            numMembers,
00132                                              oaUInt4            start,
00133                                              oaString           &out,
00134                                              oaUInt4            &loc) const;
00135 
00136     virtual void            get(const oaByte    *data,
00137                                 oaString        &out,
00138                                 oaUInt4         &loc) const;
00139 
00140     oaBoolean               isNormalChar(oaChar c) const;
00141     oaBoolean               isBusChar(oaChar c) const;
00142     oaBoolean               isHexDelimiter(oaChar c) const;
00143     oaBoolean               isEscChar(oaChar c) const;
00144     oaBoolean               isEscapableChar(oaChar c) const;
00145 
00146     void                    escapeStr(oaString  &str,
00147                                       oaUInt4   bgn,
00148                                       oaUInt4   &end) const;
00149 
00150     static oaKeywordTbl     *getKeywordTbl();
00151     static void             setKeywordTbl(oaKeywordTbl *keywordTblIn);
00152 
00153     oaString                bitDelimiter;
00154     oaChar                  hierDelimiter;
00155     oaChar                  hexDelimiter;
00156     oaChar                  openBus;
00157     oaChar                  closeBus;
00158     oaChar                  escDelimiter;
00159 
00160     static const oaString   _keywords[];
00161     static oaStringTbl      *keywordTbl;
00162     static oaUInt4          _keywordTblRef;
00163 };
00164 
00165 
00166 
00167 END_OA_NAMESPACE
00168 
00169 #endif

Return to top of page