diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-08 12:36:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-08 15:47:26 +0200 |
commit | 35662787f479b93b3205310934574132609461cc (patch) | |
tree | 3a53faca30dde0ecfe7c66bfc667c915ee1bfe9b /tracer | |
parent | 20c2f6cde170e1a8703858e17530fcf68e4efbe4 (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 'tracer')
42 files changed, 0 insertions, 2298 deletions
diff --git a/tracer/Makefile.am b/tracer/Makefile.am deleted file mode 100644 index acaf926..0000000 --- a/tracer/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -# file : tracer/Makefile.am -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -SUBDIRS = __path__(dirs) -EXTRA_DIST = __file__(extra_dist)
\ No newline at end of file diff --git a/tracer/include/driver.cxx b/tracer/include/driver.cxx deleted file mode 100644 index f2f9382..0000000 --- a/tracer/include/driver.cxx +++ /dev/null @@ -1,41 +0,0 @@ -// file : tracer/include/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// Test inclusion of -odb files (compilation test). -// -// The setup of this test is as follows: the ODB compiler has two -// additional include directories in its search path: .. and ../.. -// while the C++ compiler has only ../.. . This way, if a ..-based -// path is used in the generated code, the C++ compilation will -// fail. -// - -#include <memory> -#include <cassert> -#include <iostream> - -#include <odb/exceptions.hxx> -#include <odb/transaction.hxx> -#include <odb/tracer/database.hxx> - -#include "test1.hxx" -#include "test1-odb.hxx" - -#include "test2.hxx" -#include "test2-odb.hxx" - -#include "test3.hxx" -#include "test3-odb.hxx" - -#include "test4.hxx" -#include "test4-odb.hxx" - -using namespace std; -using namespace odb::core; - -int -main () -{ -} diff --git a/tracer/include/makefile b/tracer/include/makefile deleted file mode 100644 index a7f7089..0000000 --- a/tracer/include/makefile +++ /dev/null @@ -1,90 +0,0 @@ -# file : tracer/include/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := obj1.hxx obj2.hxx obj3.hxx test1.hxx test2.hxx test3.hxx test4.hxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) \ --I$(out_base)/../.. -I$(src_base)/../.. -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -genf := $(foreach f,$(odb_hdr:.hxx=-odb),$(addprefix $f,.hxx .ixx .cxx)) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen): odb_options += --database tracer -$(gen): cpp_options := -I$(out_base) -I$(src_base)/.. -I$(src_base)/../.. -$(gen): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist: not supported. -# -$(dist): - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(odb_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/include/obj1.hxx b/tracer/include/obj1.hxx deleted file mode 100644 index ef2429b..0000000 --- a/tracer/include/obj1.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : tracer/include/obj1.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJ1_HXX -#define OBJ1_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object1 -{ - object1 (unsigned long id) - : id_ (id) - { - } - - object1 () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // OBJ1_HXX diff --git a/tracer/include/obj2.hxx b/tracer/include/obj2.hxx deleted file mode 100644 index 71018a8..0000000 --- a/tracer/include/obj2.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : tracer/include/obj2.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJ2_HXX -#define OBJ2_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object2 -{ - object2 (unsigned long id) - : id_ (id) - { - } - - object2 () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // OBJ2_HXX diff --git a/tracer/include/obj3.hxx b/tracer/include/obj3.hxx deleted file mode 100644 index 92bdc0b..0000000 --- a/tracer/include/obj3.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : tracer/include/obj3.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJ3_HXX -#define OBJ3_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object3 -{ - object3 (unsigned long id) - : id_ (id) - { - } - - object3 () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // OBJ3_HXX diff --git a/tracer/include/objs1.hxx b/tracer/include/objs1.hxx deleted file mode 100644 index 98c0f2f..0000000 --- a/tracer/include/objs1.hxx +++ /dev/null @@ -1,15 +0,0 @@ -// file : tracer/include/objs1.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS1_HXX -#define OBJS1_HXX - -#ifdef ODB_COMPILER -# include <include/obj1.hxx> -# include <include/obj2.hxx> -# include <include/obj3.hxx> -#endif - -#endif // OBJS1_HXX diff --git a/tracer/include/objs2.hxx b/tracer/include/objs2.hxx deleted file mode 100644 index c19811a..0000000 --- a/tracer/include/objs2.hxx +++ /dev/null @@ -1,15 +0,0 @@ -// file : tracer/include/objs2.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS2_HXX -#define OBJS2_HXX - -#ifdef ODB_COMPILER -# include "include/obj1.hxx" -# include "include/obj2.hxx" -# include "include/obj3.hxx" -#endif - -#endif // OBJS2_HXX diff --git a/tracer/include/objs3.hxx b/tracer/include/objs3.hxx deleted file mode 100644 index b8828de..0000000 --- a/tracer/include/objs3.hxx +++ /dev/null @@ -1,13 +0,0 @@ -// file : tracer/include/objs3.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS3_HXX -#define OBJS3_HXX - -#include "../include/obj1.hxx" -#include "../include/obj2.hxx" -#include "../include/obj3.hxx" - -#endif // OBJS3_HXX diff --git a/tracer/include/objs4.hxx b/tracer/include/objs4.hxx deleted file mode 100644 index 7f76aea..0000000 --- a/tracer/include/objs4.hxx +++ /dev/null @@ -1,13 +0,0 @@ -// file : tracer/include/objs1.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS4_HXX -#define OBJS4_HXX - -#include <tracer/include/obj1.hxx> -#include <tracer/include/obj2.hxx> -#include <tracer/include/obj3.hxx> - -#endif // OBJS4_HXX diff --git a/tracer/include/test.std b/tracer/include/test.std deleted file mode 100644 index e69de29..0000000 --- a/tracer/include/test.std +++ /dev/null diff --git a/tracer/include/test1.hxx b/tracer/include/test1.hxx deleted file mode 100644 index 6f08900..0000000 --- a/tracer/include/test1.hxx +++ /dev/null @@ -1,18 +0,0 @@ -// file : tracer/include/test1.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST1_HXX -#define TEST1_HXX - -// Test include directive parsing. -// -#include"obj1.hxx" - - # include \ - <tracer/include/obj2.hxx> - -/*comment*/ # /*comment*/ include /* comment */ "obj3.hxx" // comment - -#endif // TEST1_HXX diff --git a/tracer/include/test2.hxx b/tracer/include/test2.hxx deleted file mode 100644 index 74623d4..0000000 --- a/tracer/include/test2.hxx +++ /dev/null @@ -1,17 +0,0 @@ -// file : tracer/include/test2.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST2_HXX -#define TEST2_HXX - -// Test preference of includes from the main file. -// -#include "objs1.hxx" - -#include "obj1.hxx" -#include "obj2.hxx" -#include "obj3.hxx" - -#endif // TEST2_HXX diff --git a/tracer/include/test3.hxx b/tracer/include/test3.hxx deleted file mode 100644 index 3f1b762..0000000 --- a/tracer/include/test3.hxx +++ /dev/null @@ -1,14 +0,0 @@ -// file : tracer/include/test3.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST3_HXX -#define TEST3_HXX - -// Test preference of longer (more qualified) paths. -// -#include "objs2.hxx" -#include "objs3.hxx" - -#endif // TEST3_HXX diff --git a/tracer/include/test4.hxx b/tracer/include/test4.hxx deleted file mode 100644 index 8ea681a..0000000 --- a/tracer/include/test4.hxx +++ /dev/null @@ -1,14 +0,0 @@ -// file : tracer/include/test3.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST3_HXX -#define TEST3_HXX - -// Test preference of <> over "". -// -#include "objs2.hxx" -#include "objs4.hxx" - -#endif // TEST3_HXX diff --git a/tracer/makefile b/tracer/makefile deleted file mode 100644 index e566c59..0000000 --- a/tracer/makefile +++ /dev/null @@ -1,41 +0,0 @@ -# file : tracer/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make - -tests := \ -template \ -object \ -include \ -pragma \ -transaction \ -types - -default := $(out_base)/ -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) - -$(dist): name := tracer -$(dist): export dirs := $(filter-out include,$(tests)) -$(dist): export extra_dist := $(name)-vc9.sln $(name)-vc10.sln test.bat -$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests))) - $(call meta-automake) - $(call meta-vc9sln,$(name)-vc9.sln) - $(call meta-vc10sln,$(name)-vc10.sln) - $(call meta-vctest,$(name)-vc10.sln,test.bat) - - -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) - -$(call include,$(bld_root)/meta/vc9sln.make) -$(call include,$(bld_root)/meta/vc10sln.make) -$(call include,$(bld_root)/meta/vctest.make) -$(call include,$(bld_root)/meta/automake.make) - -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) diff --git a/tracer/object/driver.cxx b/tracer/object/driver.cxx deleted file mode 100644 index 4ea6329..0000000 --- a/tracer/object/driver.cxx +++ /dev/null @@ -1,234 +0,0 @@ -// file : tracer/object/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// Test object persistence operations. -// - -#include <memory> -#include <cassert> -#include <iostream> - -#include <odb/exceptions.hxx> -#include <odb/transaction.hxx> -#include <odb/tracer/database.hxx> - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -using namespace odb::core; - -int -main () -{ - odb::tracer::database db; - - // database operation out of transaction - // - cout << "\ntest 001" << endl; - { - object o1 (1); - try - { - cout << "s 1" << endl; - db.persist (o1); - cout << "s 2.a" << endl; - } - catch (const not_in_transaction&) - { - cout << "s 2.b" << endl; - } - } - - // transient -> persistent - // - cout << "\ntest 002" << endl; - { - object o1 (1); - transaction t (db.begin ()); - cout << "s 1" << endl; - db.persist (o1); - cout << "s 2" << endl; - t.commit (); - cout << "s 3" << endl; - } - - // transient -> persistent (already exist) - // - cout << "\ntest 003" << endl; - { - object o1 (0); - transaction t (db.begin ()); - cout << "s 1" << endl; - try - { - db.persist (o1); - } - catch (const object_already_persistent&) - { - cout << "object already persistent" << endl; - } - cout << "s 2" << endl; - } - - // persistent -> transient - // - cout << "\ntest 004" << endl; - { - object o1 (1); - object o2 (2); - transaction t (db.begin ()); - cout << "s 1" << endl; - db.persist (o1); - db.persist (o2); - cout << "s 2" << endl; - db.erase (o1); - db.erase<object> (2); - cout << "s 3" << endl; - t.commit (); - cout << "s 4" << endl; - } - - // persistent -> transient (not exist) - // - cout << "\ntest 005" << endl; - { - object o1 (0); - transaction t (db.begin ()); - cout << "s 1" << endl; - try - { - db.erase (o1); - } - catch (const object_not_persistent&) - { - cout << "object not persistent" << endl; - } - cout << "s 2" << endl; - } - - // load new object - // - cout << "\ntest 006" << endl; - { - transaction t (db.begin ()); - cout << "s 1" << endl; - auto_ptr<object> o1 (db.load<object> (1)); - cout << "s 2" << endl; - t.commit (); - cout << "s 3" << endl; - } - - // load new object (not exist) - // - cout << "\ntest 007" << endl; - { - transaction t (db.begin ()); - cout << "s 1" << endl; - try - { - auto_ptr<object> o1 (db.load<object> (0)); - } - catch (const object_not_persistent&) - { - cout << "object not persistent" << endl; - } - cout << "s 2" << endl; - } - - // load into existing object - // - cout << "\ntest 008" << endl; - { - object o1; - transaction t (db.begin ()); - cout << "s 1" << endl; - db.load (1, o1); - cout << "s 2" << endl; - t.commit (); - cout << "s 3" << endl; - } - - // load into existing object (not exist) - // - cout << "\ntest 009" << endl; - { - object o1; - transaction t (db.begin ()); - cout << "s 1" << endl; - try - { - db.load (0, o1); - } - catch (const object_not_persistent&) - { - cout << "object not persistent" << endl; - } - cout << "s 2" << endl; - } - - // update - // - cout << "\ntest 010" << endl; - { - transaction t (db.begin ()); - cout << "s 1" << endl; - auto_ptr<object> o1 (db.load<object> (1)); - cout << "s 2" << endl; - db.update (*o1); - cout << "s 3" << endl; - t.commit (); - cout << "s 4" << endl; - } - - // update (not exist) - // - cout << "\ntest 011" << endl; - { - object o1 (0); - transaction t (db.begin ()); - cout << "s 1" << endl; - try - { - db.update (o1); - } - catch (const object_not_persistent&) - { - cout << "object not persistent" << endl; - } - cout << "s 2" << endl; - } - - // find new object - // - cout << "\ntest 012" << endl; - { - transaction t (db.begin ()); - cout << "s 1" << endl; - auto_ptr<object> o1 (db.find<object> (1)); - assert (o1.get () != 0); - auto_ptr<object> o2 (db.find<object> (0)); - assert (o2.get () == 0); - cout << "s 2" << endl; - t.commit (); - cout << "s 3" << endl; - } - - // load into existing object - // - cout << "\ntest 013" << endl; - { - object o1; - transaction t (db.begin ()); - cout << "s 1" << endl; - bool r (db.find (1, o1)); - assert (r); - r = db.find (0, o1); - assert (!r); - cout << "s 2" << endl; - t.commit (); - cout << "s 3" << endl; - } -} diff --git a/tracer/object/makefile b/tracer/object/makefile deleted file mode 100644 index bd0efca..0000000 --- a/tracer/object/makefile +++ /dev/null @@ -1,104 +0,0 @@ -# file : tracer/object/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -genf := $(addprefix $(odb_hdr:.hxx=-odb),.hxx .ixx .cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database tracer -$(gen): cpp_options := -I$(src_base) -$(gen): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/tracer/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(odb_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/object/test.hxx b/tracer/object/test.hxx deleted file mode 100644 index 38bbd7f..0000000 --- a/tracer/object/test.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : tracer/object/test.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object -{ - object (unsigned long id) - : id_ (id) - { - } - - object () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // TEST_HXX diff --git a/tracer/object/test.std b/tracer/object/test.std deleted file mode 100644 index aa495e7..0000000 --- a/tracer/object/test.std +++ /dev/null @@ -1,108 +0,0 @@ - -test 001 -s 1 -s 2.b - -test 002 -begin transaction -s 1 -insert ::object id 1 -s 2 -commit transaction -s 3 - -test 003 -begin transaction -s 1 -insert ::object id 0 -object already persistent -s 2 -rollback transaction - -test 004 -begin transaction -s 1 -insert ::object id 1 -insert ::object id 2 -s 2 -delete ::object id 1 -delete ::object id 2 -s 3 -commit transaction -s 4 - -test 005 -begin transaction -s 1 -delete ::object id 0 -object not persistent -s 2 -rollback transaction - -test 006 -begin transaction -s 1 -select ::object id 1 -s 2 -commit transaction -s 3 - -test 007 -begin transaction -s 1 -select ::object id 0 -object not persistent -s 2 -rollback transaction - -test 008 -begin transaction -s 1 -select ::object id 1 -s 2 -commit transaction -s 3 - -test 009 -begin transaction -s 1 -select ::object id 0 -object not persistent -s 2 -rollback transaction - -test 010 -begin transaction -s 1 -select ::object id 1 -s 2 -update ::object id 1 -s 3 -commit transaction -s 4 - -test 011 -begin transaction -s 1 -update ::object id 0 -object not persistent -s 2 -rollback transaction - -test 012 -begin transaction -s 1 -select ::object id 1 -select ::object id 0 -s 2 -commit transaction -s 3 - -test 013 -begin transaction -s 1 -select ::object id 1 -select ::object id 0 -s 2 -commit transaction -s 3 diff --git a/tracer/pragma/driver.cxx b/tracer/pragma/driver.cxx deleted file mode 100644 index 2f89ad5..0000000 --- a/tracer/pragma/driver.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// file : tracer/pragma/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// Test #pragma db parsing. -// - -#include <memory> -#include <cassert> -#include <iostream> - -#include <odb/exceptions.hxx> -#include <odb/transaction.hxx> -#include <odb/tracer/database.hxx> - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -using namespace odb::core; - -int -main () -{ -} diff --git a/tracer/pragma/makefile b/tracer/pragma/makefile deleted file mode 100644 index 688c6e1..0000000 --- a/tracer/pragma/makefile +++ /dev/null @@ -1,104 +0,0 @@ -# file : tracer/pragma/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -genf := $(addprefix $(odb_hdr:.hxx=-odb),.hxx .ixx .cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database tracer -$(gen): cpp_options := -I$(src_base) -$(gen): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/tracer/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(odb_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/pragma/test.hxx b/tracer/pragma/test.hxx deleted file mode 100644 index 46f251e..0000000 --- a/tracer/pragma/test.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// file : tracer/template/test.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include <odb/core.hxx> - -#pragma db value(bool) type ("INT") - -struct x {int i;}; -#pragma db value (x) - -namespace N -{ - #pragma db object - struct object1 - { - object1 () {} - - #pragma db id - unsigned long id_; - - #pragma db member type ("INT") - bool b_; - }; - - struct object2 - { - object2 () {} - - unsigned long id_; - }; - - #pragma db object (object2) -} - -PRAGMA_DB (member (N::object2::id_) id auto); - -#endif // TEST_HXX diff --git a/tracer/pragma/test.std b/tracer/pragma/test.std deleted file mode 100644 index e69de29..0000000 --- a/tracer/pragma/test.std +++ /dev/null diff --git a/tracer/template/Makefile.am b/tracer/template/Makefile.am deleted file mode 100644 index 4305788..0000000 --- a/tracer/template/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# file : tracer/template/Makefile.am -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -EXTRA_DIST = __file__(extra_dist) - -noinst_PROGRAMS = driver -driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) -AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' -AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)' - -TESTS=$(top_builddir)/tester -TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; - -m4_ifelse(__value__(odb_options),,, - -# ODB compilation. -# -driver_SOURCES += test.hxx -nodist_driver_SOURCES = test-odb.cxx -BUILT_SOURCES = test-odb.hxx -CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx - -ODB = @ODB@ -ODBFLAGS = @ODBFLAGS@ -ODBCPPFLAGS = @ODBCPPFLAGS@ - -test-odb.hxx: test.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< -) diff --git a/tracer/template/driver.cxx b/tracer/template/driver.cxx deleted file mode 100644 index e63fae6..0000000 --- a/tracer/template/driver.cxx +++ /dev/null @@ -1,35 +0,0 @@ -// file : tracer/template/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// PLACE TEST DESCRIPTION HERE -// - -#include <memory> -#include <cassert> -#include <iostream> - -#include <odb/exceptions.hxx> -#include <odb/transaction.hxx> -#include <odb/tracer/database.hxx> - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -using namespace odb::core; - -int -main () -{ - odb::tracer::database db; - - // - // - cout << "test 001" << endl; - { - transaction t (db.begin ()); - t.commit (); - } -} diff --git a/tracer/template/makefile b/tracer/template/makefile deleted file mode 100644 index e527f3d..0000000 --- a/tracer/template/makefile +++ /dev/null @@ -1,104 +0,0 @@ -# file : tracer/template/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -genf := $(addprefix $(odb_hdr:.hxx=-odb),.hxx .ixx .cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database tracer -$(gen): cpp_options := -I$(src_base) -$(gen): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/tracer/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(odb_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/template/template-vc10.vcxproj b/tracer/template/template-vc10.vcxproj deleted file mode 100644 index 1bcb4ac..0000000 --- a/tracer/template/template-vc10.vcxproj +++ /dev/null @@ -1,180 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{__uuid__()}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>__value__(name)</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-tracer-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-tracer-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-tracer.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-tracer.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> -m4_ifelse(__value__(odb_options),,, -m4_dnl - <ItemGroup> -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - </ItemGroup>) - <ItemGroup> -m4_ifelse(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_entry__(driver.cxx) -m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/tracer/template/template-vc10.vcxproj.filters b/tracer/template/template-vc10.vcxproj.filters deleted file mode 100644 index 951015b..0000000 --- a/tracer/template/template-vc10.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -m4_ifelse(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_filter_entry__(driver.cxx) -m4_ifelse(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/tracer/template/template-vc9.vcproj b/tracer/template/template-vc9.vcproj deleted file mode 100644 index 8e52acb..0000000 --- a/tracer/template/template-vc9.vcproj +++ /dev/null @@ -1,361 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="__value__(name)" - ProjectGUID="{__uuid__()}" - RootNamespace="__value__(name)" - Keyword="Win32Proj" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-tracer-d.lib odb-d.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-tracer.lib odb.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-tracer-d.lib odb-d.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-tracer.lib odb.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cxx" - UniqueIdentifier="{__uuid__()}" - > -__source_entry__(driver.cxx) -m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </Filter> - <Filter - Name="Header Files" - Filter="h;hxx;ixx;txx" - UniqueIdentifier="{__uuid__()}" - > -m4_ifelse(__value__(odb_options),,, -__file_entry_custom_build__( -test.hxx, -odb test.hxx, -odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) -__file_entry__(test-odb.hxx) -__file_entry__(test-odb.ixx)) -__file_entries__(extra_headers) - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/tracer/template/test.hxx b/tracer/template/test.hxx deleted file mode 100644 index 93b7b93..0000000 --- a/tracer/template/test.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : tracer/template/test.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object -{ - object (unsigned long id) - : id_ (id) - { - } - - object () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // TEST_HXX diff --git a/tracer/template/test.std b/tracer/template/test.std deleted file mode 100644 index ac654fc..0000000 --- a/tracer/template/test.std +++ /dev/null @@ -1,3 +0,0 @@ -test 001 -begin transaction -commit transaction diff --git a/tracer/test.bat b/tracer/test.bat deleted file mode 100644 index fcae726..0000000 --- a/tracer/test.bat +++ /dev/null @@ -1,70 +0,0 @@ -@echo off -rem file : tracer/test.bat -rem author : Boris Kolpackov <boris@codesynthesis.com> -rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -rem license : GNU GPL v2; see accompanying LICENSE file - -setlocal - -set "tests=__path__(dirs)" -set "confs=__path__(configurations)" -set "plats=__path__(platforms)" -set "curdir=%CD%" -set "topdir=%curdir%\.." -set "failed=" - -goto start - -rem -rem %1 - test directory -rem %2 - configuration -rem %3 - platform -rem -:run_test - cd %1 - - if "_%3_" == "_Win32_" ( - set "dir=%2" - ) else ( - set "dir=%3\%2" - ) - - if exist %dir%\driver.exe ( - echo %1\%3\%2 - call %topdir%\tester.bat tracer %2 %3 - if errorlevel 1 ( - set "failed=%failed% %1\%3\%2" - ) - ) - - cd %curdir% -goto :eof - -:start - -for %%t in (%tests%) do ( - for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_test %%t %%c %%p - ) - ) -) - -if not "_%failed%_" == "__" goto error - -echo. -echo ALL TESTS PASSED -echo. -goto end - -:error -if not "_%failed%_" == "__" ( - echo. - for %%t in (%failed%) do echo FAILED: %%t - echo. -) -endlocal -exit /b 1 - -:end -endlocal diff --git a/tracer/tracer-vc10.sln b/tracer/tracer-vc10.sln deleted file mode 100644 index 9a5dc32..0000000 --- a/tracer/tracer-vc10.sln +++ /dev/null @@ -1,15 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -__projects__ -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution -__solution_configurations__ - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution -__project_configurations__ - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tracer/tracer-vc9.sln b/tracer/tracer-vc9.sln deleted file mode 100644 index 2ec9432..0000000 --- a/tracer/tracer-vc9.sln +++ /dev/null @@ -1,15 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -__projects__ -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution -__solution_configurations__ - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution -__project_configurations__ - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tracer/transaction/driver.cxx b/tracer/transaction/driver.cxx deleted file mode 100644 index e1c7849..0000000 --- a/tracer/transaction/driver.cxx +++ /dev/null @@ -1,92 +0,0 @@ -// file : tracer/transaction/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// Test transaction operations. -// - -#include <cassert> -#include <iostream> - -#include <odb/exceptions.hxx> -#include <odb/transaction.hxx> -#include <odb/tracer/database.hxx> -#include <odb/tracer/transaction.hxx> - -using namespace std; -using namespace odb::core; -namespace tracer = odb::tracer; - -int -main () -{ - tracer::database db; - - assert (!transaction::has_current ()); - - // Current and db accessors. - // - cout << "test 001" << endl; - { - transaction t (db.begin ()); - assert (&t.database () == &db); - assert (transaction::has_current ()); - assert (&transaction::current () == &t); - transaction::reset_current (); - assert (!transaction::has_current ()); - transaction t2 (db.begin (), false); - assert (!transaction::has_current ()); - transaction::current (t2); - assert (&transaction::current () == &t2); - } - - // Commit. - // - cout << "test 002" << endl; - { - transaction t (db.begin ()); - t.commit (); - } - - // Rollback. - // - cout << "test 003" << endl; - { - transaction t (db.begin ()); - t.rollback (); - } - - // Auto rollback. - // - cout << "test 004" << endl; - { - transaction t (db.begin ()); - } - - // Nested transaction. - // - cout << "test 005" << endl; - { - transaction t (db.begin ()); - try - { - transaction n (db.begin ()); - } - catch (const already_in_transaction&) - { - cout << "already_in_transaction" << endl; - } - } - - // Concrete transaction type. - // - cout << "test 006" << endl; - { - assert (sizeof (tracer::transaction) == sizeof (transaction)); - - tracer::transaction t (db.begin ()); - tracer::transaction& r (tracer::transaction::current ()); - assert (&t == &r); - } -} diff --git a/tracer/transaction/makefile b/tracer/transaction/makefile deleted file mode 100644 index 5cc6ef5..0000000 --- a/tracer/transaction/makefile +++ /dev/null @@ -1,87 +0,0 @@ -# file : tracer/transaction/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/tracer/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/transaction/test.std b/tracer/transaction/test.std deleted file mode 100644 index 792010c..0000000 --- a/tracer/transaction/test.std +++ /dev/null @@ -1,21 +0,0 @@ -test 001 -begin transaction -begin transaction -rollback transaction -rollback transaction -test 002 -begin transaction -commit transaction -test 003 -begin transaction -rollback transaction -test 004 -begin transaction -rollback transaction -test 005 -begin transaction -already_in_transaction -rollback transaction -test 006 -begin transaction -rollback transaction diff --git a/tracer/types/driver.cxx b/tracer/types/driver.cxx deleted file mode 100644 index 9c1b97d..0000000 --- a/tracer/types/driver.cxx +++ /dev/null @@ -1,35 +0,0 @@ -// file : tracer/types/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// Test C++ type handling (anonymous types, aliasing). -// - -#include <memory> -#include <cassert> -#include <iostream> - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -using namespace odb::core; - -template <typename T1, typename T2> -struct same_p -{ - static const bool result = false; -}; - -template <typename T> -struct same_p<T, T> -{ - static const bool result = true; -}; - -int -main () -{ - assert ((same_p<odb::object_traits<object2>::id_type, int>::result)); -} diff --git a/tracer/types/makefile b/tracer/types/makefile deleted file mode 100644 index 2a7ceb5..0000000 --- a/tracer/types/makefile +++ /dev/null @@ -1,104 +0,0 @@ -# file : tracer/types/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -genf := $(addprefix $(odb_hdr:.hxx=-odb),.hxx .ixx .cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database tracer -$(gen): cpp_options := -I$(src_base) -$(gen): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/tracer/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(odb_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/types/test.hxx b/tracer/types/test.hxx deleted file mode 100644 index c37692b..0000000 --- a/tracer/types/test.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// file : tracer/types/test.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include <iosfwd> - -#ifdef ODB_COMPILER -typedef int int_t; -typedef short num_t; -#else -typedef int num_t; -#endif - -typedef num_t num_type; - -#pragma db object -struct object1 -{ - typedef int int_type; - - #pragma db id - int_type id_; -}; - -#pragma db object -struct object2 -{ - #pragma db id - num_type num_; -}; - -// Template-id with "inner" name (compilation test). -// -template <typename X> -struct num_wrap -{ -#ifdef ODB_COMPILER - typedef num_wrap this_type; -#endif - - X v_; -}; - -template <typename X> -std::ostream& -operator<< (std::ostream& os, const num_wrap<X>& x) -{ - return os << x.v_; -} - -template <typename X> -bool -operator== (const num_wrap<X>& x, const num_wrap<X>& y) -{ - return x.v_ == y.v_; -} - -#pragma db object -struct object3 -{ - #pragma db id - num_wrap<int> num_; -}; - -#endif // TEST_HXX diff --git a/tracer/types/test.std b/tracer/types/test.std deleted file mode 100644 index e69de29..0000000 --- a/tracer/types/test.std +++ /dev/null |