aboutsummaryrefslogtreecommitdiff
path: root/odb/tracer/inline.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-08 12:36:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-08 15:46:32 +0200
commit10e1c1963096586b484988958539756385ce2c35 (patch)
tree8ed6d7d6d5ca5cb225c949dd463f14d32448d979 /odb/tracer/inline.cxx
parenta9f5ab78b88a1ce675234b81cb089cdc627ae3af (diff)
Get rid of special tracer database
The include, types, and pragma tests have been moved to the common/ directory while the object test has been merged into common/lifecycle. The transaction test will be re-implemented as common/ test as soon as SQL statement tracing support is merged.
Diffstat (limited to 'odb/tracer/inline.cxx')
-rw-r--r--odb/tracer/inline.cxx92
1 files changed, 0 insertions, 92 deletions
diff --git a/odb/tracer/inline.cxx b/odb/tracer/inline.cxx
deleted file mode 100644
index de4282a..0000000
--- a/odb/tracer/inline.cxx
+++ /dev/null
@@ -1,92 +0,0 @@
-// file : odb/tracer/inline.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
-// license : GNU GPL v3; see accompanying LICENSE file
-
-#include <odb/common.hxx>
-#include <odb/context.hxx>
-#include <odb/tracer/generate.hxx>
-
-using namespace std;
-
-namespace tracer
-{
- namespace
- {
- struct class_: traversal::class_, context
- {
- virtual void
- traverse (type& c)
- {
- if (c.file () != unit.file ())
- return;
-
- if (!object (c))
- return;
-
- string const& type (c.fq_name ());
- string traits ("access::object_traits< " + type + " >");
-
- semantics::data_member& id (*id_member (c));
-
- 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
- << "}";
-
- // callback ()
- //
- os << "inline" << endl
- << "void " << traits << "::" << endl
- << "callback (database&, object_type&, callback_event)"
- << "{"
- << "}";
-
- os << "inline" << endl
- << "void " << traits << "::" << endl
- << "callback (database&, const object_type&, callback_event)"
- << "{"
- << "}";
- }
- };
- }
-
- namespace inline_
- {
- void
- generate ()
- {
- context ctx;
- ostream& os (ctx.os);
-
- traversal::unit unit;
- traversal::defines unit_defines;
- traversal::namespace_ ns;
- class_ c;
-
- unit >> unit_defines >> ns;
- unit_defines >> c;
-
- traversal::defines ns_defines;
-
- ns >> ns_defines >> ns;
- ns_defines >> c;
-
- os << "namespace odb"
- << "{";
-
- unit.dispatch (ctx.unit);
-
- os << "}";
- }
- }
-}