diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-04-06 15:44:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-04-06 15:44:26 +0200 |
commit | 6e4d86618645c45d07c3a8113f4641cb9161309e (patch) | |
tree | cc03cb8d0c7dbf9ef1cc2335f31034630f49b9a1 /libxsde/xsde/cxx/serializer/genx/document.hxx | |
parent | b76292f8f22817401f61158a42afcfc210102657 (diff) |
Add support for XML pretty-printing
examples/cxx/hybrid/:
examples/cxx/serializer/: turn on pretty-printing
Diffstat (limited to 'libxsde/xsde/cxx/serializer/genx/document.hxx')
-rw-r--r-- | libxsde/xsde/cxx/serializer/genx/document.hxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/libxsde/xsde/cxx/serializer/genx/document.hxx b/libxsde/xsde/cxx/serializer/genx/document.hxx index 19117d6..ee06795 100644 --- a/libxsde/xsde/cxx/serializer/genx/document.hxx +++ b/libxsde/xsde/cxx/serializer/genx/document.hxx @@ -189,6 +189,13 @@ namespace xsde void reset (); + public: + // Serialization flags. + // + typedef unsigned short flags; + + static const flags pretty_print; + #ifdef XSDE_IOSTREAM public: // Serialize to std::ostream. The std::ios_base::failure @@ -197,7 +204,7 @@ namespace xsde // used. // void - serialize (std::ostream&); + serialize (std::ostream&, flags = 0); #endif public: @@ -205,7 +212,7 @@ namespace xsde // output XML. // void - serialize (writer&); + serialize (writer&, flags = 0); // Serialize by calling the write and flush functions. If the // unbounded write function is not provided, the bounded version @@ -226,10 +233,17 @@ namespace xsde #endif void - serialize (write_bound_func, flush_func, void* user_data); + serialize (write_bound_func, + flush_func, + void* user_data, + flags = 0); void - serialize (write_func, write_bound_func, flush_func, void* user_data); + serialize (write_func, + write_bound_func, + flush_func, + void* user_data, + flags = 0); public: // Low-level, genx-specific serialization. With this method |