Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

ph::common::object_writer_context Class Reference

#include <persistable_object.hpp>


Detailed Description

A context used to start a tag, and then correctly end it upon destruction.

This allows code such as:

object_writer_context c(writer, "foo"); c.attr("name", "foo_1"); c.data("Hello World");

To be used rather than explicitly starting and ending the tags.

Definition at line 145 of file persistable_object.hpp.

Public Member Functions

 object_writer_context (object_writer *writer, const std::string &tagname)
 ~object_writer_context ()
void attr (const std::string &name, const std::string &value)
void data (const std::string &d)


Constructor & Destructor Documentation

ph::common::object_writer_context::object_writer_context object_writer writer,
const std::string &  tagname
[inline]
 

Definition at line 160 of file persistable_object.hpp.

References ph::common::object_writer::start().

ph::common::object_writer_context::~object_writer_context  )  [inline]
 

Definition at line 163 of file persistable_object.hpp.

References ph::common::object_writer::end().


Member Function Documentation

void ph::common::object_writer_context::attr const std::string &  name,
const std::string &  value
[inline]
 

Definition at line 165 of file persistable_object.hpp.

References ph::common::object_writer::attr().

Referenced by persist_test::test_dumper::test().

void ph::common::object_writer_context::data const std::string &  d  )  [inline]
 

Definition at line 167 of file persistable_object.hpp.

References ph::common::object_writer::data().

Referenced by persist_test::test_dumper::test().


The documentation for this class was generated from the following file:
Generated on Wed Apr 5 22:03:34 2006 for cppxmlobj by  doxygen 1.4.3