From 30d797ffff4a8e2492500aea2135567f91b15aa0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 23 Jul 2010 14:42:52 +0200 Subject: Add generation of the image class definition --- odb/mysql/inline.cxx | 68 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'odb/mysql/inline.cxx') diff --git a/odb/mysql/inline.cxx b/odb/mysql/inline.cxx index 44cf9d0..8388cac 100644 --- a/odb/mysql/inline.cxx +++ b/odb/mysql/inline.cxx @@ -6,50 +6,50 @@ #include #include -namespace +namespace mysql { - struct class_: traversal::class_, context + namespace { - class_ (context& c) - : context (c) + struct class_: traversal::class_, context { - } + class_ (context& c) + : context (c) + { + } - virtual void - traverse (type& c) - { - if (c.file () != unit.file ()) - return; + virtual void + traverse (type& c) + { + if (c.file () != unit.file ()) + return; - if (!c.count ("object")) - return; + if (!c.count ("object")) + return; - string const& type (c.fq_name ()); - string traits ("access::object_traits< " + type + " >"); + string const& type (c.fq_name ()); + string traits ("access::object_traits< " + type + " >"); - id_member t (*this); - t.traverse (c); - semantics::data_member& id (*t.member ()); + id_member t (*this); + t.traverse (c); + semantics::data_member& id (*t.member ()); - os << "// " << c.name () << endl - << "//" << endl - << endl; + os << "// " << c.name () << endl + << "//" << endl + << endl; - // id () - // - os << "inline" << endl - << traits << "::id_type" << endl - << traits << "::" << endl - << "id (const object_type& obj)" - << "{" - << "return obj." << id.name () << ";" << endl - << "}"; - } - }; -} + // id () + // + os << "inline" << endl + << traits << "::id_type" << endl + << traits << "::" << endl + << "id (const object_type& obj)" + << "{" + << "return obj." << id.name () << ";" << endl + << "}"; + } + }; + } -namespace mysql -{ void generate_inline (context& ctx) { -- cgit v1.1