Inheritance diagram for code::Writer:

There will be one writer subclass associated with every type of storage device. For maximum portability, all that the writer does is to write from a buffer (in memory). It does no parsing of the information content.
LB_Writer
File_Writer
Public Member Functions | |
| virtual int | writeOut (const Buffer &b, const char *deviceName, const char *messageName) const =0 |
| Write into the storage device. | |
| int | writeOut (const Buffer &b, const std::string &dev, const std::string &msg) const |
| int | writeOut (const Buffer &b, const std::string &filename) const |
| virtual | ~Writer () |
| Call descendant's destructor. | |
| int | writeXMLDocument (const XML::Document &, const std::string &deviceName, const std::string &messageName) |
| Given a document created from its root element, the contents (in textual form) will be written out. | |
Static Public Member Functions | |
| static SmartPtr< Writer > | getWriter (const std::string &) |
| Obtain the storage type's Writer. | |
Protected Member Functions | |
| Writer () | |
| Empty default constructor. | |
| virtual code::Writer::~Writer | ( | ) | [virtual] |
Call descendant's destructor.
| code::Writer::Writer | ( | ) | [protected] |
Empty default constructor.
Should be used only by subclasses; all others should use the factory method getWriter().
Obtain the storage type's Writer.
Pass in as StorageType::FlatFile, etc. Of course, you can pass in the std::string itself.
On error, return SmartPtr that evaluates to NULL (or 0).
| const_string& | storage type |
| int code::Writer::writeOut | ( | const Buffer & | b, | |
| const std::string & | filename | |||
| ) | const [inline] |
| int code::Writer::writeOut | ( | const Buffer & | b, | |
| const std::string & | dev, | |||
| const std::string & | msg | |||
| ) | const [inline] |
| virtual int code::Writer::writeOut | ( | const Buffer & | b, | |
| const char * | deviceName, | |||
| const char * | messageName | |||
| ) | const [pure virtual] |
Write into the storage device.
Return zero on success and negative on error.
Implemented in code::LBWriter, code::BzipWriter, code::FileWriter, code::GzipWriter, and code::ZlibWriter.
| int code::Writer::writeXMLDocument | ( | const XML::Document & | , | |
| const std::string & | deviceName, | |||
| const std::string & | messageName | |||
| ) |
Given a document created from its root element, the contents (in textual form) will be written out.
This method writes out the entire document.
XMLDocument
1.4.7