aboutsummaryrefslogtreecommitdiff
path: root/common/ctor/test.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/ctor/test.hxx')
-rw-r--r--common/ctor/test.hxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/ctor/test.hxx b/common/ctor/test.hxx
new file mode 100644
index 0000000..3d08ed0
--- /dev/null
+++ b/common/ctor/test.hxx
@@ -0,0 +1,31 @@
+// file : common/ctor/test.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef TEST_HXX
+#define TEST_HXX
+
+#include <string>
+
+#include <odb/core.hxx>
+
+#pragma db object
+struct person
+{
+ person (const std::string& first,
+ const std::string& last,
+ unsigned short age)
+ : first_ (first), last_ (last), age_ (age)
+ {
+ }
+
+ #pragma db id auto
+ unsigned long id_;
+
+ std::string first_;
+ std::string last_;
+ unsigned short age_;
+};
+
+#endif // TEST_HXX