Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

DataXML::OutputXMLStream Class Reference

Output stream for XML data objects. More...

#include <XMLStream.h>

List of all members.

Public Methods

 OutputXMLStream ()
 use cout as a default ostream. More...

 OutputXMLStream (std::ostream &os)
 set default ostream, default stream is stored externally and must not cease to exist before it is released by setDefaultStream(). More...

 ~OutputXMLStream ()
 release default stream. More...

bool write (const DataObject &, std::ostream &) const
 render data object into specified ostream false if error, check ostream state. More...

bool write (const DataObject &) const
 render data object into default ostream, false if error, check default ostream state. More...

std::ostream& getDefaultStream () const
 get default stream. More...

void setDefaultStream (std::ostream &=std::cout)
 change default stream, release previous default stream (not used anymore). More...


Private Attributes

std::ostream* m_def_stream
 default stream. More...


Detailed Description

You can specify the stream for every write() separately or set a default stream. Because default stream is stored externally, you should make sure stream is not destroyed while it is set default.
Examples:

dxml_copy_example.cpp, dxml_read_example.cpp, and dxml_write_example.cpp.

Definition at line 99 of file XMLStream.h.


Constructor & Destructor Documentation

DataXML::OutputXMLStream::OutputXMLStream ( )
 

DataXML::OutputXMLStream::OutputXMLStream ( std::ostream & os )
 

DataXML::OutputXMLStream::~OutputXMLStream ( )
 


Member Function Documentation

std::ostream & DataXML::OutputXMLStream::getDefaultStream ( ) const
 

void DataXML::OutputXMLStream::setDefaultStream ( std::ostream & = std::cout )
 

bool DataXML::OutputXMLStream::write ( const DataObject & ) const
 

bool DataXML::OutputXMLStream::write ( const DataObject &,
std::ostream & ) const
 

Examples:
dxml_read_example.cpp, and dxml_write_example.cpp.

Referenced by main().


Member Data Documentation

std::ostream * DataXML::OutputXMLStream::m_def_stream [private]
 

Definition at line 132 of file XMLStream.h.


The documentation for this class was generated from the following file:
Generated at Tue Jan 28 15:35:29 2003 for DataXML by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001