From 08b159e18527c2d6844e569b1309b5033b4d47c9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 16 Mar 2013 07:44:43 +0200 Subject: Add initial support for database model serialization to XML --- odb/semantics/relational/model.cxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'odb/semantics/relational/model.cxx') diff --git a/odb/semantics/relational/model.cxx b/odb/semantics/relational/model.cxx index bbeea52..a9fe111 100644 --- a/odb/semantics/relational/model.cxx +++ b/odb/semantics/relational/model.cxx @@ -3,13 +3,29 @@ // license : GNU GPL v3; see accompanying LICENSE file #include - -#include +#include namespace semantics { namespace relational { + model:: + model (xml::parser& p) + : qscope (p, *this), + version_ (p.attribute ("version")) + { + } + + void model:: + serialize (xml::serializer& s) const + { + s.start_element (xmlns, "model"); + s.namespace_decl (xmlns, ""); // @@ evo + s.attribute ("version", version_); + qscope::serialize_content (s); + s.end_element (); + } + // type info // namespace -- cgit v1.1