00001 // ***************************************************************************** 00002 // oaCdbaNS.h 00003 // 00004 // This file contains the definition for the oaCdbaNS class. This class 00005 // implements the CDBA NameSpace used in name mapping. In conjunction with 00006 // the oaName object, the oaCdbaNS class facilitates mapping names to and from 00007 // CDBA. 00008 // 00009 // The CDBA nameSpace is case sensitive and does support vectored, stepped, 00010 // hierarchical, and bundled names. 00011 // 00012 // ***************************************************************************** 00013 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00014 // Integration Initiative, this material may not be copied, modified, 00015 // re-published, uploaded, executed, or distributed in any way, in any medium, 00016 // in whole or in part, without prior written permission from Cadence. 00017 // 00018 // Copyright 2002-2005 Cadence Design Systems, Inc. 00019 // All Rights Reserved. 00020 // 00021 // $Author: icftcm $ 00022 // $Revision: #1 $ 00023 // $Date: 2010/08/09 $ 00024 // $State: Exp $ 00025 // ***************************************************************************** 00026 // ***************************************************************************** 00027 00028 00029 00030 #if !defined(oaCdbaNS_P) 00031 #define oaCdbaNS_P 00032 00033 00034 00035 // ***************************************************************************** 00036 // Nested includes 00037 // ***************************************************************************** 00038 #include "oaName.h" 00039 00040 00041 00042 // ***************************************************************************** 00043 // Declare and define types in the OpenAccess namespace. 00044 // ***************************************************************************** 00045 BEGIN_OA_NAMESPACE 00046 00047 00048 00049 // ***************************************************************************** 00050 // oaCdbaNS 00051 // ***************************************************************************** 00052 class OA_BASE_DLL_API oaCdbaNS : public oaNameSpace { 00053 public: 00054 oaCdbaNS(); 00055 00056 virtual oaBoolean isEqual(const oaScalarName &n1, 00057 const oaScalarName &n2) const; 00058 virtual oaBoolean isEqual(const oaVectorName &n1, 00059 const oaVectorName &n2) const; 00060 virtual oaBoolean isEqual(const oaVectorBitName &n1, 00061 const oaVectorBitName &n2) const; 00062 virtual oaBoolean isEqual(const oaBundleName &n1, 00063 const oaBundleName &n2) const; 00064 virtual oaBoolean isEqual(const oaSimpleName &n1, 00065 const oaSimpleName &n2) const; 00066 virtual oaBoolean isEqual(const oaName &n1, 00067 const oaName &n2) const; 00068 00069 virtual oaNameType getType(const oaChar *in) const; 00070 00071 private: 00072 virtual oaBoolean isEqual(const oaNameMem &n1, 00073 const oaNameMem &n2) const; 00074 virtual oaBoolean isEqual(const oaVectorName &n1, 00075 const oaVectorBitName &n2) const; 00076 00077 virtual void getInternalMember(const oaChar *in, 00078 oaString &out, 00079 oaBoolean &caseSensitive, 00080 oaUInt4 len, 00081 oaUInt4 flags = 0) const; 00082 virtual void getInternalScalar(const oaChar *in, 00083 oaScalarName &out) const; 00084 virtual void getInternalVBit(const oaChar *in, 00085 oaVectorBitName &out, 00086 oaBoolean baseOnly = false) const; 00087 virtual void getInternalVector(const oaChar *in, 00088 oaVectorName &out, 00089 oaBoolean baseOnly = false) const; 00090 virtual void getInternalBundle(const oaChar *in, 00091 oaBundleName &out) const; 00092 00093 virtual void getMember(const oaChar *in, 00094 oaBoolean caseSensitive, 00095 oaString &out, 00096 oaUInt4 &loc, 00097 oaUInt4 flags = 0) const; 00098 virtual void getMemberArray(const oaNameMem *in, 00099 oaUInt4 numMembers, 00100 oaString &out, 00101 oaUInt4 &loc) const; 00102 virtual void getScalarName(const oaScalarName &in, 00103 oaString &out, 00104 oaUInt4 &loc) const; 00105 virtual void getVectorName(const oaVectorName &in, 00106 oaString &out, 00107 oaUInt4 &loc) const; 00108 virtual void getVectorBitName(const oaVectorBitName &in, 00109 oaString &out, 00110 oaUInt4 &loc) const; 00111 virtual void getVectorBitName(const oaNameMem *in, 00112 oaUInt4 numMembers, 00113 oaUInt4 start, 00114 oaString &out, 00115 oaUInt4 &loc) const; 00116 virtual void getBundleName(const oaBundleName &in, 00117 oaString &out, 00118 oaUInt4 &loc) const; 00119 00120 virtual void get(const oaByte *data, 00121 oaString &out, 00122 oaUInt4 &loc) const; 00123 00124 void getSimple(const oaByte *data, 00125 oaUInt4 &dIndex, 00126 oaString &out, 00127 oaUInt4 &loc) const; 00128 void getBundle(const oaByte *data, 00129 oaUInt4 &dIndex, 00130 oaString &out, 00131 oaUInt4 &loc) const; 00132 00133 oaBoolean isNormalChar(oaChar c) const; 00134 oaBoolean isBusChar(oaChar c) const; 00135 oaBoolean isHexDelimiter(oaChar c) const; 00136 00137 void expandExpr(const oaChar *&in, 00138 oaUInt4 repeat, 00139 oaBundleName &out) const; 00140 void expandVectorExpr(const oaChar *&expr, 00141 const oaChar *base, 00142 oaBundleName &out) const; 00143 void getExprBase(const oaChar *&expr, 00144 oaString &out) const; 00145 void getRepeat(const oaChar *&in, 00146 oaUInt4 &repeatVal) const; 00147 void getVector(const oaChar *&in, 00148 oaUInt4 &start, 00149 oaUInt4 &stop, 00150 oaUInt4 &step) const; 00151 void applyRepeat(oaBundleName &out, 00152 oaUInt4 start, 00153 oaUInt4 numElems, 00154 oaUInt4 repeatVal) const; 00155 00156 oaChar hierDelimiter; 00157 oaChar openBus; 00158 oaChar closeBus; 00159 oaChar bitDelimiter; 00160 oaChar hexDelimiter; 00161 oaChar nameDelimiter; 00162 oaChar repeat; 00163 }; 00164 00165 00166 00167 END_OA_NAMESPACE 00168 00169 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.