#include "CTBxmlIStream.hxx"
Collaboration diagram for CTBxmlIStream:
Public Methods | |
CTBxmlIStream () | |
CTBxmlIStream (istream *p_is) | |
CTBxmlIStream (const char *c_filename, int i_mode=ios::in, int i_prot=0664) | |
virtual | ~CTBxmlIStream () |
void | Attach (istream *p_is) |
void | Open (const char *c_filename, int i_mode=ios::in, int i_prot=0664) |
void | Close () |
bool | Good () const |
bool | Bad () const |
bool | Fail () const |
bool | Eof () const |
bool | Eod () const |
void | TrimWhite (bool b_trim) |
void | DropWhite (bool b_drop) |
bool | TrimWhite () const |
bool | DropWhite () const |
void | Get (CTBxmlToken &token) |
void | GetTagOrData (CTBxmlToken &token) |
void | GetTagOrNonWhiteData (CTBxmlToken &token) |
void | Unget (CTBxmlToken &token) |
const CTBxmlToken & | Peek () |
const CTBxmlToken & | PeekTagOrData () |
const CTBxmlToken & | PeekTagOrNonWhiteData () |
bool | NextNotEnd () |
bool | CheckElement (const char *c_name) |
void | GetTaggedValue (const char *c_name, int &i_value) |
void | GetTaggedValue (const char *c_name, float &f_value) |
void | GetTaggedValue (const char *c_name, double &d_value) |
void | GetTaggedValue (const char *c_name, CTBstring &value) |
void | GetTaggedValue (const char *c_name, CTBtime &value) |
void | OpenElement (const char *c_name=0) |
void | CloseElement () |
void | DropElement () |
istream * | GetDataStream () |
void | ToStream (ostream &os) const |
void | Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const |
bool | operator! () const |
operator void * () const | |
CTBxmlIStream & | operator>> (CTBxmlToken &token) |
CTBxmlIStream & | operator>> (const CTBxmlOpen &manip) |
CTBxmlIStream & | operator>> (const CTBxmlClose &manip) |
Private Methods | |
void | GetDataFromLexer (CTBxmlToken &token) |
void | GetTagFromLexer (CTBxmlToken &token) |
void | SetFail (const char *c_message) |
const CTBxmlToken & | FailToken () const |
CTBstring | ConvertCharRef (const CTBstring &cref) |
CTBstring | ConvertEntityRef (const CTBstring &eref) |
int | GetLexerToken (int i_lexmode, CTBxmlToken &token) |
Private Attributes | |
istream * | mp_is |
bool | mb_attached |
bool | mb_trimwhite |
bool | mb_dropwhite |
bool | mb_fail |
bool | mb_bad |
bool | mb_eof |
istrstream * | mp_iss |
CTBstring | m_data |
CTBvector< CTBstring > | m_tagstack |
CTBint | mi_taglevel |
CTBxmlToken | m_untoken |
CTBxmlToken | m_token |
CTBxmlLexer | m_lex |
CTBxmlLexerToken | m_lextoken |
Related Functions | |
(Note that these are not member functions.) | |
template<class T> CTBxmlIStream & | operator>> (CTBxmlIStream &xis, T &obj) |
ostream & | operator<< (ostream &os, const CTBxmlIStream &obj) |
Definition at line 89 of file CTBxmlIStream.hxx.
|
Default constructor.
Definition at line 216 of file CTBxmlIStream.cxx. |
|
Construct with attached stream.
Definition at line 236 of file CTBxmlIStream.cxx. |
|
Construct with a file.
Definition at line 256 of file CTBxmlIStream.cxx. |
|
Definition at line 277 of file CTBxmlIStream.cxx. |
|
Attach external stream.
Definition at line 286 of file CTBxmlIStream.cxx. Referenced by Open().
|
|
open stream.
Definition at line 299 of file CTBxmlIStream.cxx. Referenced by CTBxmlIStream().
|
|
close stream.
Definition at line 322 of file CTBxmlIStream.cxx. Referenced by Attach(), Open(), and ~CTBxmlIStream().
|
|
State check: good flag.
Definition at line 103 of file CTBxmlIStream.icc. Referenced by ToStream().
|
|
State check: bad flag.
Definition at line 111 of file CTBxmlIStream.icc. |
|
State check: fail flag.
Definition at line 118 of file CTBxmlIStream.icc. Referenced by operator void *(), and operator!().
|
|
State check: eof flag.
Definition at line 126 of file CTBxmlIStream.icc. Referenced by ToStream().
|
|
State check: eod flag.
Definition at line 134 of file CTBxmlIStream.icc. |
|
If b_trim is
Definition at line 142 of file CTBxmlIStream.icc. |
|
If b_drop is
Definition at line 151 of file CTBxmlIStream.icc. |
|
Returns
Definition at line 160 of file CTBxmlIStream.icc. Referenced by Get().
|
|
Returns
Definition at line 168 of file CTBxmlIStream.icc. |
|
Get next token.
Definition at line 346 of file CTBxmlIStream.cxx. Referenced by CloseElement(), GetTagOrData(), GetTaggedValue(), Peek(), and operator>>().
|
|
Get next tag or data token.
Definition at line 405 of file CTBxmlIStream.cxx. Referenced by GetDataStream(), GetTagOrNonWhiteData(), GetTaggedValue(), and PeekTagOrData().
|
|
Get next tag or non-white data token.
Definition at line 420 of file CTBxmlIStream.cxx. Referenced by OpenElement(), and PeekTagOrNonWhiteData().
|
|
Unget token.
The token is effectively `pushed back' into the input stream and will be re-delivered with the next The token is cleared by this method and shouldn't be used afterwards. Definition at line 441 of file CTBxmlIStream.cxx. Referenced by GetDataStream(), GetTaggedValue(), OpenElement(), Peek(), PeekTagOrData(), and PeekTagOrNonWhiteData().
|
|
Returns a read-only reference to the next token in the stream.
Definition at line 461 of file CTBxmlIStream.cxx. |
|
Returns a read-only reference to the next tag or data token.
Definition at line 477 of file CTBxmlIStream.cxx. |
|
Returns a read-only reference to the next tag or non-white data token.
Definition at line 496 of file CTBxmlIStream.cxx. Referenced by CheckElement(), CTBattrList::FromXStream(), and NextNotEnd().
|
|
Returns
Definition at line 176 of file CTBxmlIStream.icc. Referenced by CTBattrList::FromXStream().
|
|
Returns
Definition at line 517 of file CTBxmlIStream.cxx. |
|
Definition at line 530 of file CTBxmlIStream.cxx. Referenced by CTBattrList::FromXStream().
|
|
Definition at line 553 of file CTBxmlIStream.cxx. |
|
Definition at line 576 of file CTBxmlIStream.cxx. |
|
Definition at line 599 of file CTBxmlIStream.cxx. |
|
Definition at line 624 of file CTBxmlIStream.cxx. |
|
Opens an element.
Definition at line 638 of file CTBxmlIStream.cxx. Referenced by DropElement(), CTBattrList::FromXStream(), GetTaggedValue(), and operator>>().
|
|
Closes current element.
Definition at line 656 of file CTBxmlIStream.cxx. Referenced by DropElement(), CTBattrList::FromXStream(), GetTaggedValue(), and operator>>().
|
|
Drop next element.
Definition at line 669 of file CTBxmlIStream.cxx. Referenced by CTBattrList::FromXStream().
|
|
Returns a strstream with the last cdata value.
Definition at line 680 of file CTBxmlIStream.cxx. Referenced by operator>>().
|
|
ostream insertion.
Definition at line 712 of file CTBxmlIStream.cxx. Referenced by operator<<().
|
|
Dump.
Definition at line 743 of file CTBxmlIStream.cxx. |
|
Negation operator, returns
Definition at line 187 of file CTBxmlIStream.icc. |
|
Returns non-zero pointer if stream NOT in
Definition at line 195 of file CTBxmlIStream.icc. |
|
extract a token from input stream (see
Definition at line 203 of file CTBxmlIStream.icc. |
|
expect a start tag (see
Definition at line 212 of file CTBxmlIStream.icc. |
|
Expect an end tag (see
Definition at line 221 of file CTBxmlIStream.icc. |
|
Get next token: expect data.
Definition at line 772 of file CTBxmlIStream.cxx. Referenced by Get().
|
|
Get next token: expect tag.
Definition at line 826 of file CTBxmlIStream.cxx. Referenced by Get().
|
|
Set fail state bit.
Definition at line 996 of file CTBxmlIStream.cxx. Referenced by Get(), GetDataStream(), GetTaggedValue(), and OpenElement().
|
|
Returns const reference to a token in state fail.
Definition at line 1007 of file CTBxmlIStream.cxx. Referenced by Peek(), PeekTagOrData(), and PeekTagOrNonWhiteData().
|
|
Convert a character reference.
Definition at line 1017 of file CTBxmlIStream.cxx. Referenced by GetDataFromLexer(), and GetTagFromLexer().
|
|
Convert a entity reference.
Definition at line 1026 of file CTBxmlIStream.cxx. Referenced by GetDataFromLexer(), and GetTagFromLexer().
|
|
Combo: set lexer mode, get lexer token, add text to token, returns type.
Definition at line 1043 of file CTBxmlIStream.cxx. Referenced by GetDataFromLexer(), and GetTagFromLexer().
|
|
xistream extraction operator.
Definition at line 234 of file CTBxmlIStream.icc. |
|
ostream insertion operator.
Definition at line 247 of file CTBxmlIStream.icc. |
|
input stream pointer.
Definition at line 169 of file CTBxmlIStream.hxx. |
|
true if stream attached.
Definition at line 170 of file CTBxmlIStream.hxx. |
|
trim white space of data.
Definition at line 171 of file CTBxmlIStream.hxx. |
|
drop white space only data.
Definition at line 172 of file CTBxmlIStream.hxx. |
|
state: operation failed.
Definition at line 173 of file CTBxmlIStream.hxx. |
|
state: major stream error.
Definition at line 174 of file CTBxmlIStream.hxx. |
|
state: end-of-file.
Definition at line 175 of file CTBxmlIStream.hxx. |
|
string stream for cdata.
Definition at line 176 of file CTBxmlIStream.hxx. |
|
holds text if cdata token.
Definition at line 177 of file CTBxmlIStream.hxx. |
|
stack of parent tags.
Definition at line 178 of file CTBxmlIStream.hxx. |
|
tag nesting level.
Definition at line 179 of file CTBxmlIStream.hxx. |
|
ungotten token.
Definition at line 180 of file CTBxmlIStream.hxx. |
|
`current' token.
Definition at line 181 of file CTBxmlIStream.hxx. |
|
lexer.
Definition at line 182 of file CTBxmlIStream.hxx. |
|
lexer token.
Definition at line 183 of file CTBxmlIStream.hxx. |