00001 00006 /*----------------------------------------------------------------------------*/ 00007 /* C Tool Box: Designed and implemented by: */ 00008 /* Walter F.J. Mueller Gesellschaft fuer Schwerionenforschung (GSI) */ 00009 /* Planckstrasse 1, D-64291 Darmstadt, Germany */ 00010 /* Email: W.F.J.Mueller@gsi.de */ 00011 /* WWW: http://www-kp3.gsi.de/www/kp3/people/mueller.html */ 00012 /*----------------------------------------------------------------------------*/ 00013 00014 00015 //------------------------------------------+----------------------------------- 00017 00018 inline int CTBxmlLexer::NLine() const 00019 { 00020 return mi_nline_t; 00021 } 00022 00023 //------------------------------------------+----------------------------------- 00025 00026 inline int CTBxmlLexer::NColumn() const 00027 { 00028 return mi_ncolumn_t; 00029 } 00030 00031 //------------------------------------------+----------------------------------- 00033 00093 inline void CTBxmlLexer::Mode(int i_mode) 00094 { 00095 mi_mode = i_mode; 00096 return; 00097 } 00098 00099 //------------------------------------------+----------------------------------- 00101 00102 inline int CTBxmlLexer::Mode() const 00103 { 00104 return mi_mode; 00105 } 00106 00107 //############################################################################## 00108 00109 //------------------------------------------+----------------------------------- 00111 00112 inline CTBxmlLexerToken::CTBxmlLexerToken() 00113 : mi_type(invalid) 00114 {} 00115 00116 //------------------------------------------+----------------------------------- 00118 00119 inline int CTBxmlLexerToken::Type() const 00120 { 00121 return mi_type; 00122 } 00123 00124 //------------------------------------------+----------------------------------- 00126 00127 inline void CTBxmlLexerToken::Type(int i_type) 00128 { 00129 mi_type = i_type; 00130 return; 00131 } 00132 00133 //------------------------------------------+----------------------------------- 00135 00136 inline const CTBstring& CTBxmlLexerToken::Text() const 00137 { 00138 return m_text; 00139 } 00140 00141 //------------------------------------------+----------------------------------- 00143 00144 inline void CTBxmlLexerToken::Clear() 00145 { 00146 mi_type = invalid; 00147 m_text.Clear(); 00148 return; 00149 } 00150 00151 //------------------------------------------+----------------------------------- 00153 00154 inline bool CTBxmlLexerToken::operator!() const 00155 { 00156 return mi_type == invalid; 00157 } 00158 00159 //------------------------------------------+----------------------------------- 00161 00162 inline CTBxmlLexerToken::operator const char*() const 00163 { 00164 return (mi_type == invalid) ? 0 : (const char*) m_text; 00165 } 00166 00167 //------------------------------------------+----------------------------------- 00169 00170 inline CTBxmlLexerToken::operator CTBstring() const 00171 { 00172 return m_text; 00173 } 00174 00175 //------------------------------------------+----------------------------------- 00177 00178 inline CTBxmlLexerToken& CTBxmlLexerToken::operator=(const char* c_text) 00179 { 00180 m_text = c_text; 00181 return *this; 00182 } 00183 00184 //------------------------------------------+----------------------------------- 00186 00187 inline CTBxmlLexerToken& CTBxmlLexerToken::operator+=(char c) 00188 { 00189 m_text += c; 00190 return *this; 00191 } 00192 00193 //------------------------------------------+----------------------------------- 00195 00196 inline CTBxmlLexerToken& CTBxmlLexerToken::operator+=(const char* c_text) 00197 { 00198 m_text += c_text; 00199 return *this; 00200 } 00201 00202 //------------------------------------------+----------------------------------- 00208 inline ostream& operator<<(ostream& os, const CTBxmlLexerToken& obj) 00209 { 00210 obj.ToStream(os); 00211 return os; 00212 }