#include "CTBxmlOStream.hxx"
Collaboration diagram for CTBxmlOStream:
Public Methods | |
CTBxmlOStream () | |
CTBxmlOStream (ostream *p_os) | |
CTBxmlOStream (const char *c_filename, int i_mode=ios::out, int i_prot=0664) | |
virtual | ~CTBxmlOStream () |
void | Attach (ostream *p_os) |
void | Open (const char *c_filename, int i_mode=ios::out, int i_prot=0664) |
void | Close () |
bool | Good () const |
bool | Bad () const |
bool | Fail () const |
bool | Eof () const |
void | PutStartTag (const char *c_name) |
void | PutEmptyTag (const char *c_name) |
void | PutEndTag () |
void | PutTaggedValue (const char *c_name, int i_value, const char *c_format=0, int i_width=0) |
void | PutTaggedValue (const char *c_name, unsigned int i_value, const char *c_format=0, int i_width=0) |
void | PutTaggedValue (const char *c_name, long i_value, const char *c_format=0, int i_width=0) |
void | PutTaggedValue (const char *c_name, unsigned long i_value, const char *c_format=0, int i_width=0) |
void | PutTaggedValue (const char *c_name, double d_value, const char *c_format=0, int i_width=0, int i_precision=0) |
void | PutTaggedValue (const char *c_name, const char *c_value, bool b_dropempty=false) |
void | PutTaggedValue (const char *c_name, const CTBstring &value, bool b_dropempty=false) |
void | PutTaggedValue (const char *c_name, const CTBtime &value, bool b_dropinvalid=false) |
ostream * | Stream () const |
void | SetBad () |
void | SetFail () |
void | Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const |
bool | operator! () const |
operator void * () const | |
CTBxmlOStream & | operator<< (const char *c_text) |
CTBxmlOStream & | operator<< (char *c_text) |
CTBxmlOStream & | operator<< (const CTBxmlStartTag &tag) |
CTBxmlOStream & | operator<< (const CTBxmlEmptyTag &tag) |
CTBxmlOStream & | operator<< (const CTBxmlEndTag &tag) |
Private Types | |
enum | type { starttag, endtag, emptytag } |
Private Methods | |
void | PutEscapedString (const char *c_text, CTBint i_length=-1) |
void | PutEscapedString (const CTBstring &string) |
Private Attributes | |
ostream * | mp_os |
bool | mb_attached |
bool | mb_autonewline |
bool | mb_autoindent |
bool | mb_bad |
bool | mb_fail |
int | mi_lasttag |
CTBstack< CTBstring > | m_tagstack |
Definition at line 24 of file CTBxmlOStream.hxx.
|
Definition at line 94 of file CTBxmlOStream.hxx. |
|
Default constructor.
Definition at line 31 of file CTBxmlOStream.cxx. |
|
Construct with attached stream.
Definition at line 46 of file CTBxmlOStream.cxx. |
|
Construct with a file.
Definition at line 61 of file CTBxmlOStream.cxx. |
|
Definition at line 77 of file CTBxmlOStream.cxx. |
|
Attach external stream.
Definition at line 86 of file CTBxmlOStream.cxx. Referenced by Open().
|
|
Open stream.
Definition at line 102 of file CTBxmlOStream.cxx. Referenced by CTBxmlOStream().
|
|
Close stream.
Definition at line 126 of file CTBxmlOStream.cxx. Referenced by Attach(), Open(), and ~CTBxmlOStream().
|
|
State check: good flag.
Definition at line 148 of file CTBxmlOStream.cxx. |
|
State check: bad flag.
Definition at line 157 of file CTBxmlOStream.cxx. |
|
State check: fail flag.
Definition at line 165 of file CTBxmlOStream.cxx. Referenced by operator void *(), and operator!().
|
|
State check: eof flag.
Definition at line 174 of file CTBxmlOStream.cxx. |
|
Write start tag.
Definition at line 183 of file CTBxmlOStream.cxx. Referenced by PutTaggedValue(), CTBattrList::ToXStream(), and operator<<().
|
|
Write empty tag.
Definition at line 203 of file CTBxmlOStream.cxx. Referenced by operator<<().
|
|
Write end tag.
Definition at line 222 of file CTBxmlOStream.cxx. Referenced by Close(), PutTaggedValue(), CTBattrList::ToXStream(), and operator<<().
|
|
Write
Definition at line 247 of file CTBxmlOStream.cxx. Referenced by CTBattrList::ToXStream().
|
|
Write
Definition at line 264 of file CTBxmlOStream.cxx. |
|
Write
Definition at line 282 of file CTBxmlOStream.cxx. |
|
Write
Definition at line 299 of file CTBxmlOStream.cxx. |
|
Write
Definition at line 317 of file CTBxmlOStream.cxx. |
|
Write
Definition at line 336 of file CTBxmlOStream.cxx. |
|
Write
Definition at line 355 of file CTBxmlOStream.cxx. |
|
Write
Definition at line 374 of file CTBxmlOStream.cxx. |
|
Access ostream pointer (INTERNAL).
Definition at line 19 of file CTBxmlOStream.icc. Referenced by operator<<().
|
|
Set bad overwrite flag (INTERNAL).
Definition at line 29 of file CTBxmlOStream.icc. Referenced by PutEmptyTag(), PutEndTag(), PutStartTag(), PutTaggedValue(), operator<<(), and operator<<().
|
|
Set fail overwrite flag (INTERNAL).
Definition at line 41 of file CTBxmlOStream.icc. Referenced by PutEndTag().
|
|
Dump.
Definition at line 393 of file CTBxmlOStream.cxx. |
|
Negation operator, returns
Definition at line 50 of file CTBxmlOStream.icc. |
|
Returns non-zero pointer if stream NOT in
Definition at line 58 of file CTBxmlOStream.icc. |
|
Write string.
Definition at line 415 of file CTBxmlOStream.cxx. Referenced by operator<<().
|
|
Write string. This form is needed for string literals, which have the type `array of char' and are thus unfortunately for some historical reason `non-const'. Definition at line 70 of file CTBxmlOStream.icc. |
|
Write start tag.
Definition at line 78 of file CTBxmlOStream.icc. |
|
Write empty tag.
Definition at line 87 of file CTBxmlOStream.icc. |
|
Write end tag.
Definition at line 96 of file CTBxmlOStream.icc. |
|
Write string and escape '<', '>', and '&'.
Definition at line 426 of file CTBxmlOStream.cxx. Referenced by PutEscapedString(), PutTaggedValue(), and operator<<().
|
|
Write string and escape '<', '>', and '&'.
Definition at line 447 of file CTBxmlOStream.cxx. |
|
output stream pointer.
Definition at line 99 of file CTBxmlOStream.hxx. |
|
true if stream attached.
Definition at line 100 of file CTBxmlOStream.hxx. |
|
add
Definition at line 101 of file CTBxmlOStream.hxx. |
|
indent tag if true.
Definition at line 102 of file CTBxmlOStream.hxx. |
|
if true forces bad state.
Definition at line 103 of file CTBxmlOStream.hxx. |
|
if true forces fail state.
Definition at line 104 of file CTBxmlOStream.hxx. |
|
type of last tag.
Definition at line 105 of file CTBxmlOStream.hxx. |
|
stack of parent tags.
Definition at line 106 of file CTBxmlOStream.hxx. |