blob: 1e38b6ec43e0b07a3f3e823cbfc46a0e15ebb3a8 (
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
|
// file : odb/traversal/relational/key.hxx
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license : GNU GPL v3; see accompanying LICENSE file
#ifndef ODB_TRAVERSAL_RELATIONAL_KEY_HXX
#define ODB_TRAVERSAL_RELATIONAL_KEY_HXX
#include <odb/semantics/relational/key.hxx>
#include <odb/traversal/relational/elements.hxx>
namespace traversal
{
namespace relational
{
struct contains: edge<semantics::relational::contains>
{
contains () {}
contains (node_dispatcher& n) {node_traverser (n);}
virtual void
traverse (type&);
};
template <typename T>
struct key_template: node<T>
{
public:
virtual void
traverse (T& k)
{
contains (k);
}
virtual void
contains (T& k)
{
contains (k, *this);
}
virtual void
contains (T& k, edge_dispatcher& d)
{
this->iterate_and_dispatch (k.contains_begin (), k.contains_end (), d);
}
};
struct key: key_template<semantics::relational::key> {};
}
}
#endif // ODB_TRAVERSAL_RELATIONAL_KEY_HXX
|