From 6e4d86618645c45d07c3a8113f4641cb9161309e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Apr 2009 15:44:26 +0200 Subject: Add support for XML pretty-printing examples/cxx/hybrid/: examples/cxx/serializer/: turn on pretty-printing --- libxsde/xsde/cxx/serializer/genx/document.hxx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'libxsde/xsde/cxx/serializer/genx/document.hxx') 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 -- cgit v1.1