54 toOpaquePtr(Type* ptr)
58 return static_cast<void*
>(ptr);
70 toOpaquePtr(
const Type* ptr)
74 return static_cast<const void*
>(ptr);
87 return const_cast<void*
>(
static_cast<const void*
>(ptr));
99 toByteBlock(Type* ptr)
119 toByteBlock(
const Type* ptr)
142 return reinterpret_cast<Type*
>(toByteBlock(pointer) + distance);
163 reinterpret_cast<Type*
> 165 toByteBlock(pointer) - distance
218 template <
unsigned ArgsCount>
219 struct CompositeExtractor;
223 struct CompositeExtractor<1>
225 template <
class Value>
230 #if defined (ONIXS_B3_BOE_CXX11) 234 std::declval<typename Value::MemberTraits::FirstArgType>()
244 extractValue<typename Value::MemberTraits::FirstArgType>(location)
251 struct CompositeExtractor<2>
253 template <
class Value>
257 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
258 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
260 #if defined (ONIXS_B3_BOE_CXX11) 264 std::declval<FirstArgType>(),
265 std::declval<SecondArgType>()
275 extractValue<FirstArgType>(location),
276 extractValue<SecondArgType>(
277 advanceByBytes(location,
sizeof(FirstArgType)))
284 struct CompositeExtractor<4>
286 template <
class Value>
290 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
291 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
292 typedef typename Value::MemberTraits::ThirdArgType ThirdArgType;
293 typedef typename Value::MemberTraits::FourthArgType FourthArgType;
295 #if defined (ONIXS_B3_BOE_CXX11) 299 std::declval<FirstArgType>(),
300 std::declval<SecondArgType>(),
301 std::declval<ThirdArgType>(),
302 std::declval<FourthArgType>()
312 extractValue<FirstArgType>(location),
313 extractValue<SecondArgType>(
314 advanceByBytes(location,
sizeof(FirstArgType))),
315 extractValue<ThirdArgType>(
316 advanceByBytes(location,
sizeof(FirstArgType) +
sizeof(SecondArgType))),
317 extractValue<FourthArgType>(
318 advanceByBytes(location,
sizeof(FirstArgType) +
sizeof(SecondArgType) +
sizeof(ThirdArgType)))
329 typename EnableIf<details::HasMemberTraits<Value>::value, Value>::type
333 return CompositeExtractor<Value::MemberTraits::Count>:: template extract<Value>(location);
342 typename EnableIf<!details::HasMemberTraits<Value>::value, Value>::type
346 return extractValue<Value>(location);
355 typename EnableIf<!details::HasMemberTraits<Value>::value,
size_t>::type
358 return sizeof(Value);
367 typename EnableIf<details::HasMemberTraits<Value>::value,
size_t>::type
379 typename EnableIf<!details::HasSerializeMember<Value>::value>::type
380 commitValue(
void* location, Value value)
396 typename EnableIf<details::HasSerializeMember<Value>::value>::type
397 commitValue(
void* location, Value value)
401 value.serialize(location);
410 typename EnableIf<!details::HasValueStaticMember<Value>::value>::type
411 setValue(
void* location, Value value)
415 commitValue(location, value);
424 typename EnableIf<details::HasValueStaticMember<Value>::value>::type
425 setValue(
void* location, Value)
429 commitValue(location, Value::value());
UInt64 QWord
Alias for Quad Word.
#define ONIXS_B3_BOE_MESSAGING_NAMESPACE_END
#define ONIXS_B3_BOE_NOTHROW
#define ONIXS_B3_BOE_HOTPATH
UInt32 DWord
Alias for Double Word.
#define ONIXS_B3_BOE_CONSTEXPR
#define ONIXS_B3_BOE_MESSAGING_NAMESPACE_BEGIN
#define ONIXS_B3_BOE_PURE
UInt8 Byte
Alias for Byte.
UInt16 Word
Alias for Word.