summaryrefslogtreecommitdiff
path: root/odb/semantics/relational/index.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/semantics/relational/index.cxx')
-rw-r--r--odb/semantics/relational/index.cxx35
1 files changed, 31 insertions, 4 deletions
diff --git a/odb/semantics/relational/index.cxx b/odb/semantics/relational/index.cxx
index 11cce8d..0e62f98 100644
--- a/odb/semantics/relational/index.cxx
+++ b/odb/semantics/relational/index.cxx
@@ -3,13 +3,40 @@
// license : GNU GPL v3; see accompanying LICENSE file
#include <cutl/compiler/type-info.hxx>
-
-#include <odb/semantics/relational/index.hxx>
+#include <odb/semantics/relational.hxx>
namespace semantics
{
namespace relational
{
+ index::
+ index (xml::parser& p, uscope& s, graph& g)
+ : key (p, s, g),
+ type_ (p.attribute ("type", string ())),
+ method_ (p.attribute ("method", string ())),
+ options_ (p.attribute ("options", string ()))
+ {
+ }
+
+ void index::
+ serialize (xml::serializer& s) const
+ {
+ s.start_element (xmlns, "index");
+ key::serialize_attributes (s);
+
+ if (!type ().empty ())
+ s.attribute ("type", type ());
+
+ if (!method ().empty ())
+ s.attribute ("method", method ());
+
+ if (!options ().empty ())
+ s.attribute ("options", options ());
+
+ key::serialize_content (s);
+ s.end_element ();
+ }
+
// type info
//
namespace
@@ -18,10 +45,10 @@ namespace semantics
{
init ()
{
+ unameable::parser_map_["index"] = &unameable::parser_impl<index>;
+
using compiler::type_info;
- // index
- //
{
type_info ti (typeid (index));
ti.add_base (typeid (qnameable));