diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-16 07:44:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-10 18:46:43 +0200 |
commit | 08b159e18527c2d6844e569b1309b5033b4d47c9 (patch) | |
tree | 224a1d6e7c989740e9be806c0f3cc7fc20266eb2 /odb/semantics/relational/model.cxx | |
parent | 9fe60de16cf9411a548c020cae5ac7b9e7938e82 (diff) |
Add initial support for database model serialization to XML
Diffstat (limited to 'odb/semantics/relational/model.cxx')
-rw-r--r-- | odb/semantics/relational/model.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
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 <cutl/compiler/type-info.hxx> - -#include <odb/semantics/relational/model.hxx> +#include <odb/semantics/relational.hxx> namespace semantics { namespace relational { + model:: + model (xml::parser& p) + : qscope (p, *this), + version_ (p.attribute<version_type> ("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 |