summaryrefslogtreecommitdiff
path: root/odb/tracer/inline.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-07-23 14:42:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-07-23 14:42:52 +0200
commit30d797ffff4a8e2492500aea2135567f91b15aa0 (patch)
tree53fa570844ab3876026ec6621b40c74547e1db24 /odb/tracer/inline.cxx
parentcea6fb57ac8c9a893c0f404fef6c1469f0b6222b (diff)
Add generation of the image class definition
Diffstat (limited to 'odb/tracer/inline.cxx')
-rw-r--r--odb/tracer/inline.cxx68
1 files changed, 34 insertions, 34 deletions
diff --git a/odb/tracer/inline.cxx b/odb/tracer/inline.cxx
index 6beb8a8..ef8cf15 100644
--- a/odb/tracer/inline.cxx
+++ b/odb/tracer/inline.cxx
@@ -6,50 +6,50 @@
#include <odb/common.hxx>
#include <odb/tracer/inline.hxx>
-namespace
+namespace tracer
{
- 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 tracer
-{
void
generate_inline (context& ctx)
{