blob: 68a875084e52e80b7e4c4e9d895fc3bb6ff4a5f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// file : common/wrapper/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 <common/config.hxx> // HAVE_TR1_MEMORY
#include <string>
#include <memory> // std::auto_ptr
#include <vector>
#include <odb/core.hxx>
#include <odb/nullable.hxx>
#ifdef HAVE_TR1_MEMORY
# include <odb/tr1/memory.hxx>
#endif
using odb::nullable;
typedef nullable<std::string> nullable_string;
#ifdef HAVE_TR1_MEMORY
typedef std::tr1::shared_ptr<std::string> tr1_nullable_string;
#endif
#pragma db object
struct object
{
#pragma db id auto
unsigned long id_;
std::auto_ptr<unsigned long> num;
#pragma db null
std::auto_ptr<std::string> str;
nullable_string nstr;
std::vector<nullable_string> nstrs;
#ifdef HAVE_TR1_MEMORY
#pragma db null
tr1_nullable_string tr1_str;
#pragma db value_null
std::vector<tr1_nullable_string> tr1_strs;
#endif
};
#endif // TEST_HXX
|