5 #ifndef ODB_LAZY_POINTER_TRAITS_HXX
6 #define ODB_LAZY_POINTER_TRAITS_HXX
12 #include <odb/details/config.hxx>
21 static const bool lazy =
true;
37 return p.template object_id<O> ();
46 static const bool lazy =
true;
62 return p.template object_id<O> ();
67 template <
typename T,
typename D>
68 class pointer_traits<lazy_unique_ptr<T, D>>
72 static const bool lazy =
true;
74 typedef T element_type;
75 typedef lazy_unique_ptr<element_type, D> pointer_type;
76 typedef std::unique_ptr<element_type, D> eager_pointer_type;
79 null_ptr (
const pointer_type& p)
85 static typename object_traits<O>::id_type
86 object_id (
const pointer_type& p)
88 return p.template object_id<O> ();
93 class pointer_traits<lazy_shared_ptr<T>>
97 static const bool lazy =
true;
99 typedef T element_type;
100 typedef lazy_shared_ptr<element_type> pointer_type;
101 typedef std::shared_ptr<element_type> eager_pointer_type;
104 null_ptr (
const pointer_type& p)
110 static typename object_traits<O>::id_type
111 object_id (
const pointer_type& p)
113 return p.template object_id<O> ();
117 template <
typename T>
118 class pointer_traits<lazy_weak_ptr<T>>
122 static const bool lazy =
true;
124 typedef T element_type;
125 typedef lazy_weak_ptr<element_type> pointer_type;
126 typedef lazy_shared_ptr<element_type> strong_pointer_type;
127 typedef std::weak_ptr<element_type> eager_pointer_type;
129 static strong_pointer_type
130 lock (
const pointer_type& p)
140 #endif // ODB_LAZY_POINTER_TRAITS_HXX
Definition: lazy-ptr.hxx:23
Definition: pointer-traits.hxx:24
Definition: pointer-traits.hxx:23
static bool null_ptr(const pointer_type &p)
Definition: lazy-pointer-traits.hxx:28
lazy_ptr< element_type > pointer_type
Definition: lazy-pointer-traits.hxx:24
T element_type
Definition: lazy-pointer-traits.hxx:23
static bool null_ptr(const pointer_type &p)
Definition: lazy-pointer-traits.hxx:53
Definition: pointer-traits.hxx:28
T element_type
Definition: lazy-pointer-traits.hxx:48
Definition: forward.hxx:123
lazy_auto_ptr< element_type > pointer_type
Definition: lazy-pointer-traits.hxx:49
std::auto_ptr< element_type > eager_pointer_type
Definition: lazy-pointer-traits.hxx:50
Definition: lazy-ptr.hxx:129
Definition: pointer-traits.hxx:21
static object_traits< O >::id_type object_id(const pointer_type &p)
Definition: lazy-pointer-traits.hxx:60
element_type * eager_pointer_type
Definition: lazy-pointer-traits.hxx:25
static object_traits< O >::id_type object_id(const pointer_type &p)
Definition: lazy-pointer-traits.hxx:35
Definition: pointer-traits.hxx:22
pointer_kind
Definition: pointer-traits.hxx:19