00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef INC_MI32_IDENTIFIER_H
00048 #define INC_MI32_IDENTIFIER_H
00049
00050 #ifndef INC_MI32_CODESPACE_H
00051 #include <mi32/codespace.h>
00052 #endif
00053
00054 #ifndef INC_MI32_MISTRING_H
00055 #include <mi32/mistring.h>
00056 #endif
00057
00058 #ifndef INC_MI32_STRUTF8_H
00059 #include <mi32/strutf8.h>
00060 #endif
00061
00062 #ifndef INC_MI32_MILIST_H
00063 #include <mi32/milist.h>
00064 #endif
00065
00066 #ifndef GENERATING_DOXYGEN_OUTPUT
00067 class XMLNODE;
00068 #endif // GENERATING_DOXYGEN_OUTPUT
00069
00070 #ifdef MISYSTEMDLL
00071 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00072 #else
00073 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00074 #endif
00075
00076
00077
00078 class CLASSLIBEXPORT IDENTIFIER {
00079 public:
00080
00081
00082 IDENTIFIER (
00083 );
00084
00085
00086 IDENTIFIER (
00087 CODESPACE codespace,
00088 INT32 codenum
00089 );
00090
00091
00092
00093 IDENTIFIER (
00094 CODESPACE codespace,
00095 const char *codestr
00096 );
00097
00098
00099
00100 IDENTIFIER (
00101 const char *codestr
00102 );
00103
00104
00105 ~IDENTIFIER (
00106 );
00107
00108
00109
00110 IDENTIFIER& operator= (
00111 const char *codestr
00112 );
00113
00114 #ifndef GENERATING_DOXYGEN_OUTPUT
00115
00116 bool operator< (
00117 const IDENTIFIER& rhs
00118 ) const;
00119 #endif
00120
00121
00122
00123 ERRVALUE Assign (
00124 const char *codestr
00125 );
00126
00127
00128
00129 ERRVALUE Assign (
00130 const UINT8 *codestr
00131 );
00132
00133 #ifndef NODLLLINKAGE
00134
00135
00136
00137
00138
00139
00140
00141 ERRVALUE CreateFromXML (
00142 const XMLNODE *xmlnode
00143 );
00144 #endif
00145
00146
00147 CODESPACE GetCodespace (
00148 ) const;
00149
00150
00151 MISTRING GetFullStr (
00152 ) const;
00153
00154
00155
00156 INT32 GetNum (
00157 ) const;
00158
00159
00160
00161 const STRUTF8& GetStr (
00162 ) const;
00163
00164
00165 void Set (
00166 CODESPACE codespace,
00167 INT32 num
00168 );
00169
00170
00171 void Set (
00172 CODESPACE codespace,
00173 const char *code
00174 );
00175
00176 #ifndef GENERATING_DOXYGEN_OUTPUT
00177
00178 bool IsEqual (const IDENTIFIER& rhs) const;
00179 #endif
00180
00181 private:
00182 #ifndef GENERATING_DOXYGEN_OUTPUT
00183 CODESPACE m_codespace;
00184 INT32 m_num;
00185 STRUTF8 m_str;
00186
00187 void SetNumFromStr ();
00188 #endif // GENERATING_DOXYGEN_OUTPUT
00189 };
00190
00191 inline bool operator== (
00192 const IDENTIFIER& lhs,
00193 const IDENTIFIER& rhs
00194 ) { return (lhs.IsEqual(rhs)); }
00195
00196 inline bool operator!= (
00197 const IDENTIFIER& lhs,
00198 const IDENTIFIER& rhs
00199 ) { return (!lhs.IsEqual(rhs)); }
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210 class CLASSLIBEXPORT IDENTIFIERLIST : public MILIST<IDENTIFIER> {
00211 public:
00212
00213
00214 bool FindId (
00215 CODESPACE codespace,
00216 IDENTIFIER& id
00217 ) const;
00218 };
00219
00220 #undef CLASSLIBEXPORT
00221
00222 #endif // INC_MI32_IDENTIFIER_H