diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-10 10:57:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-10 10:57:06 +0200 |
commit | 60366c5e3e326eb0d5b828ba8bbd81f317cd24e3 (patch) | |
tree | 94e5183599242668deadf8f6b415f3ef05058d63 /xml/serializer | |
parent | e8e3ce68f3ea3ccbfaaa9a189b46676b91261a65 (diff) |
Implement support for suspending/resuming indentation in serializer
Diffstat (limited to 'xml/serializer')
-rw-r--r-- | xml/serializer | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/xml/serializer b/xml/serializer index 68e72c3..316a501 100644 --- a/xml/serializer +++ b/xml/serializer @@ -214,6 +214,30 @@ namespace xml bool lookup_namespace_prefix (const std::string& ns, std::string& prefix); + // Suspend/resume indentation. + // + public: + + // Indentation can be suspended only inside an element and, unless + // explicitly resumed, it will remain suspended until the end of + // that element. You should only explicitly resume indentation at + // the element nesting level of suspension. If indentation is already + // suspended at an outer nesting level, then subsequent calls to + // suspend/resume are ignored. The indentation_suspended() function + // can be used to check if indentation is currently suspended. If it + // is not, then this function returns 0. Otherwise, it returns the + // level at which pretty-printing was suspended, with root element + // being level 1. + // + void + suspend_indentation (); + + void + resume_indentation (); + + std::size_t + indentation_suspended () const; + private: void handle_error (genxStatus); |