#include <dumpobj.hpp>
Inheritance diagram for ph::persist::dumpobj:
We write the objects like this:
object ::= object-start sub-object-list object-end
object-start ::= TAGNAME ["(" attr-list ")"] "{"
object-end ::= "}"
sub-object-list ::= (data-object | object)*
data-object ::= TAGNAME "=" data
attr-list ::= [attr-pair ([", " attr-pair])*]
attr-pair ::= name "=" value
And a typical tree might be:
root(name=root) { x=1 foos { foo(name=foo_1) { x=1 y=2.1 z=true } foo(name=foo_2) { x=4 y=10 z=false } } }
Definition at line 21 of file dumpobj.hpp.
Public Member Functions | |
dumpobj (std::ostream *stream, std::ostream *console) | |
virtual bool | start (const std::string &tagname) |
virtual bool | attr (const std::string &name, const std::string &value) |
virtual bool | data (const std::string &d) |
virtual bool | end (const std::string &tagname) |
|
Definition at line 74 of file dumpobj.hpp. |
|
Start a new tag with the writer. Implements ph::common::object_writer. Definition at line 14 of file dumpobj.cpp. |
|
Write out name/value pairs for the tag. Implements ph::common::object_writer. Definition at line 82 of file dumpobj.cpp. |
|
Write out arbitrary data for the tag. Implements ph::common::object_writer. Definition at line 99 of file dumpobj.cpp. |
|
End the tag. Note that it is usually possible for the implementation of the writer to save away the tag name, but for keeping the writers simple, it is included again. Implements ph::common::object_writer. Definition at line 43 of file dumpobj.cpp. |