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/table.cxx | |
parent | 9fe60de16cf9411a548c020cae5ac7b9e7938e82 (diff) |
Add initial support for database model serialization to XML
Diffstat (limited to 'odb/semantics/relational/table.cxx')
-rw-r--r-- | odb/semantics/relational/table.cxx | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/odb/semantics/relational/table.cxx b/odb/semantics/relational/table.cxx index 725497e..aac50fe 100644 --- a/odb/semantics/relational/table.cxx +++ b/odb/semantics/relational/table.cxx @@ -3,13 +3,27 @@ // license : GNU GPL v3; see accompanying LICENSE file #include <cutl/compiler/type-info.hxx> - -#include <odb/semantics/relational/table.hxx> +#include <odb/semantics/relational.hxx> namespace semantics { namespace relational { + table:: + table (xml::parser& p, qscope&, graph& g) + : qnameable (p, g), uscope (p, g) + { + } + + void table:: + serialize (xml::serializer& s) const + { + s.start_element (xmlns, "table"); + qnameable::serialize_attributes (s); + uscope::serialize_content (s); + s.end_element (); + } + // type info // namespace @@ -18,32 +32,16 @@ namespace semantics { init () { + qnameable::parser_map_["table"] = &qnameable::parser_impl<table>; + using compiler::type_info; - // table - // { type_info ti (typeid (table)); ti.add_base (typeid (qnameable)); ti.add_base (typeid (uscope)); insert (ti); } - - // object_table - // - { - type_info ti (typeid (object_table)); - ti.add_base (typeid (table)); - insert (ti); - } - - // container_table - // - { - type_info ti (typeid (container_table)); - ti.add_base (typeid (table)); - insert (ti); - } } } init_; } |