aboutsummaryrefslogtreecommitdiff
path: root/common/callback/test.hxx
blob: 274e2b516d6f1bbc5a7d71a46e17b68e82ba2847 (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
// file      : common/callback/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>
#include <odb/callback.hxx>

#pragma db object callback(db_callback)
struct object
{
  object (unsigned long id, unsigned long d): id_ (id), data (d), pobj (0) {}
  object (): id_ (0) {};

  #pragma db id
  unsigned long id_;

  unsigned long data;

  object* pobj;

  void
  db_callback (odb::callback_event, odb::database&);

  void
  db_callback (odb::callback_event, odb::database&) const;
};

#endif // TEST_HXX