00001
00050 #ifndef INC_MI32_IDENTIFIER_H
00051 #define INC_MI32_IDENTIFIER_H
00052
00053 #ifndef INC_MI32_CODESPACE_H
00054 #include <mi32/codespace.h>
00055 #endif
00056
00057 #ifndef INC_MI32_MISTRING_H
00058 #include <mi32/mistring.h>
00059 #endif
00060
00061 #ifndef INC_MI32_STRUTF8_H
00062 #include <mi32/strutf8.h>
00063 #endif
00064
00065 #ifndef INC_MI32_MILIST_H
00066 #include <mi32/milist.h>
00067 #endif
00068
00069 #ifndef GENERATING_DOXYGEN_OUTPUT
00070 class XMLNODE;
00071 #endif // GENERATING_DOXYGEN_OUTPUT
00072
00073 #ifdef MISYSTEMDLL
00074 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00075 #else
00076 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00077 #endif
00078
00079
00081 class CLASSLIBEXPORT IDENTIFIER {
00082 public:
00083
00085 IDENTIFIER (
00086 );
00087
00089 IDENTIFIER (
00090 CODESPACE codespace,
00091 INT32 codenum
00092 );
00093
00096 IDENTIFIER (
00097 CODESPACE codespace,
00098 const char *codestr
00099 );
00100
00103 IDENTIFIER (
00104 const char *codestr
00105 );
00106
00108 ~IDENTIFIER (
00109 );
00110
00113 IDENTIFIER& operator= (
00114 const char *codestr
00115 );
00116
00117 #ifndef GENERATING_DOXYGEN_OUTPUT
00119 bool operator< (
00120 const IDENTIFIER& rhs
00121 ) const;
00122 #endif
00123
00126 ERRVALUE Assign (
00127 const char *codestr
00128 );
00129
00132 ERRVALUE Assign (
00133 const UINT8 *codestr
00134 );
00135
00136 #ifndef NODLLLINKAGE
00144 ERRVALUE CreateFromXML (
00145 const XMLNODE *xmlnode
00146 );
00147 #endif
00148
00150 CODESPACE GetCodespace (
00151 ) const;
00152
00154 MISTRING GetFullStr (
00155 ) const;
00156
00159 INT32 GetNum (
00160 ) const;
00161
00164 const STRUTF8& GetStr (
00165 ) const;
00166
00168 void Set (
00169 CODESPACE codespace,
00170 INT32 num
00171 );
00172
00174 void Set (
00175 CODESPACE codespace,
00176 const char *code
00177 );
00178
00179 #ifndef GENERATING_DOXYGEN_OUTPUT
00180
00181 bool IsEqual (const IDENTIFIER& rhs) const;
00182 bool IsEqualNoCase (const IDENTIFIER& rhs) const;
00183 #endif
00184
00185 private:
00186 #ifndef GENERATING_DOXYGEN_OUTPUT
00187 CODESPACE m_codespace;
00188 INT32 m_num;
00189 STRUTF8 m_str;
00190
00191 void SetNumFromStr ();
00192 #endif // GENERATING_DOXYGEN_OUTPUT
00193 };
00194
00195 inline bool operator== (
00196 const IDENTIFIER& lhs,
00197 const IDENTIFIER& rhs
00198 ) { return (lhs.IsEqual(rhs)); }
00199
00200 inline bool operator!= (
00201 const IDENTIFIER& lhs,
00202 const IDENTIFIER& rhs
00203 ) { return (!lhs.IsEqual(rhs)); }
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214 class CLASSLIBEXPORT IDENTIFIERLIST : public MILIST<IDENTIFIER> {
00215 public:
00218 bool ContainsNoCase (
00219 const IDENTIFIER& id
00220 ) const;
00221
00224 bool FindId (
00225 CODESPACE codespace,
00226 IDENTIFIER& id
00227 ) const;
00228 };
00229
00230 #undef CLASSLIBEXPORT
00231
00232 #endif // INC_MI32_IDENTIFIER_H