blob: d296c28d555bc46c6a177e379cbcbc3b64ed99bd (
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
54
55
56
|
// file : pimpl/person.hxx
// copyright : not copyrighted - public domain
#ifndef PERSON_HXX
#define PERSON_HXX
#include <string>
#include <odb/core.hxx>
#pragma db object
class person
{
public:
~person ();
person (const std::string& email,
const std::string& name,
unsigned short age);
const std::string&
email () const;
void
email (const std::string&);
const std::string&
name () const;
void
name (const std::string&);
unsigned short
age () const;
void
age (unsigned short) const;
private:
person (const person&);
person& operator= (const person&);
private:
friend class odb::access;
person ();
struct impl;
#pragma db transient
impl* pimpl_;
#pragma db member(email) virtual(std::string) id
#pragma db member(name) virtual(std::string)
#pragma db member(age) virtual(unsigned short)
};
#endif // PERSON_HXX
|