8#ifndef INCLUDED_BDLAR_MANIPULATORVTABLEUTIL
9#define INCLUDED_BDLAR_MANIPULATORVTABLEUTIL
52#include <bdlar_manipulatorvtable.h>
66 template <
class t_MANIPULATOR,
class t_REF>
67 static int manipulate(
const void *manipulatorPtr, t_REF *ref);
70 template <
class t_MANIPULATOR>
71 static int manipulateSimple(
const void *manipulatorPtr,
76 template <
class t_MANIPULATOR>
77 static int manipulateSimpleWithInfo(
const void *manipulatorPtr,
83 template <
class t_MANIPULATOR,
class t_REF>
84 static int manipulateWithInfo(
const void *manipulatorPtr,
93 template <
class t_MANIPULATOR>
98 template <
class t_MANIPULATOR>
111template <
class t_MANIPULATOR,
class t_REF>
112int ManipulatorVtableUtil::manipulate(
const void *manipulatorPtr, t_REF *ref)
114 t_MANIPULATOR& manipulator = *
reinterpret_cast<t_MANIPULATOR *
>(
115 const_cast<void *
>(manipulatorPtr));
116 return manipulator(ref);
119template <
class t_MANIPULATOR>
120int ManipulatorVtableUtil::manipulateSimple(
const void *manipulatorPtr,
123 return ref->manipulate(*
reinterpret_cast<t_MANIPULATOR *
>(
124 const_cast<void *
>(manipulatorPtr)));
127template <
class t_MANIPULATOR>
128int ManipulatorVtableUtil::manipulateSimpleWithInfo(
129 const void *manipulatorPtr,
131 const FieldInfoRef& info)
133 return ref->manipulate(*
reinterpret_cast<t_MANIPULATOR *
>(
134 const_cast<void *
>(manipulatorPtr)),
138template <
class t_MANIPULATOR,
class t_REF>
139int ManipulatorVtableUtil::manipulateWithInfo(
140 const void *manipulatorPtr,
142 const FieldInfoRef& info)
144 t_MANIPULATOR& manipulator = *
reinterpret_cast<t_MANIPULATOR *
>(
145 const_cast<void *
>(manipulatorPtr));
146 return manipulator(ref, info);
150template <
class t_MANIPULATOR>
154 &manipulate<t_MANIPULATOR, DynamicTypeRef>,
155 &manipulate<t_MANIPULATOR, ArrayRef>,
156 &manipulate<t_MANIPULATOR, ChoiceRef>,
157 &manipulate<t_MANIPULATOR, CustomizedTypeRef>,
158 &manipulate<t_MANIPULATOR, EnumRef>,
159 &manipulate<t_MANIPULATOR, NullableValueRef>,
160 &manipulate<t_MANIPULATOR, SequenceRef>,
161 &manipulateSimple<t_MANIPULATOR>
166template <
class t_MANIPULATOR>
170 &manipulateWithInfo<t_MANIPULATOR, DynamicTypeRef>,
171 &manipulateWithInfo<t_MANIPULATOR, ArrayRef>,
172 &manipulateWithInfo<t_MANIPULATOR, ChoiceRef>,
173 &manipulateWithInfo<t_MANIPULATOR, CustomizedTypeRef>,
174 &manipulateWithInfo<t_MANIPULATOR, EnumRef>,
175 &manipulateWithInfo<t_MANIPULATOR, NullableValueRef>,
176 &manipulateWithInfo<t_MANIPULATOR, SequenceRef>,
177 &manipulateSimpleWithInfo<t_MANIPULATOR>
Definition bdlar_fieldinfo.h:102
Definition bdlar_manipulatorvtableutil.h:62
static const ManipulatorVtable * getVtable()
Definition bdlar_manipulatorvtableutil.h:151
static const ManipulatorWithInfoVtable * getWithInfoVtable()
Definition bdlar_manipulatorvtableutil.h:167
Definition bdlar_simpletyperef.h:68
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlar_accessorref.h:59
reference_wrapper< T > ref(T &object)
Return a reference wrapper that represents the specified object.
Definition bdlar_manipulatorvtable.h:72
Definition bdlar_manipulatorvtable.h:101