51ONIXS_B3_UMDF_MD_HOTPATH
58 return static_cast<void*
>(ptr);
67ONIXS_B3_UMDF_MD_HOTPATH
70toOpaquePtr(
const Type* ptr)
74 return static_cast<const void*
>(ptr);
83ONIXS_B3_UMDF_MD_HOTPATH
103ONIXS_B3_UMDF_MD_HOTPATH
106toByteBlock(
const Type* ptr)
123ONIXS_B3_UMDF_MD_HOTPATH
125Type* advanceByBytes(Type* pointer, ptrdiff_t distance)
noexcept
129 return reinterpret_cast<Type*
>(toByteBlock(pointer) + distance);
139ONIXS_B3_UMDF_MD_HOTPATH
150 reinterpret_cast<Type*
>
152 toByteBlock(pointer) - distance
163ONIXS_B3_UMDF_MD_HOTPATH
185ONIXS_B3_UMDF_MD_HOTPATH
187extractValue(
const void* location)
noexcept
204template <
unsigned ArgsCount>
205struct CompositeExtractor;
209struct CompositeExtractor<1>
211 template <
class Value>
213 Value extract(
const void* location)
noexcept
216#if defined (ONIXS_B3_UMDF_MD_CXX11)
220 std::declval<typename Value::MemberTraits::FirstArgType>()
230 extractValue<typename Value::MemberTraits::FirstArgType>(location)
237struct CompositeExtractor<2>
239 template <
class Value>
241 Value extract(
const void* location)
noexcept
243 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
244 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
246#if defined (ONIXS_B3_UMDF_MD_CXX11)
250 std::declval<FirstArgType>(),
251 std::declval<SecondArgType>()
261 extractValue<FirstArgType>(location),
262 extractValue<SecondArgType>(
263 advanceByBytes(location,
sizeof(FirstArgType)))
270struct CompositeExtractor<4>
272 template <
class Value>
274 Value extract(
const void* location)
noexcept
276 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
277 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
278 typedef typename Value::MemberTraits::ThirdArgType ThirdArgType;
279 typedef typename Value::MemberTraits::FourthArgType FourthArgType;
281#if defined (ONIXS_B3_UMDF_MD_CXX11)
285 std::declval<FirstArgType>(),
286 std::declval<SecondArgType>(),
287 std::declval<ThirdArgType>(),
288 std::declval<FourthArgType>()
298 extractValue<FirstArgType>(location),
299 extractValue<SecondArgType>(
300 advanceByBytes(location,
sizeof(FirstArgType))),
301 extractValue<ThirdArgType>(
302 advanceByBytes(location,
sizeof(FirstArgType) +
sizeof(SecondArgType))),
303 extractValue<FourthArgType>(
304 advanceByBytes(location,
sizeof(FirstArgType) +
sizeof(SecondArgType) +
sizeof(ThirdArgType)))
314ONIXS_B3_UMDF_MD_HOTPATH
315typename std::enable_if<details::HasMemberTraits<Value>::value, Value>::type
316getValue(
const void* location)
noexcept
319 return CompositeExtractor<Value::MemberTraits::Count>:: template extract<Value>(location);
327ONIXS_B3_UMDF_MD_HOTPATH
328typename std::enable_if<!details::HasMemberTraits<Value>::value, Value>::type
329getValue(
const void* location)
noexcept
332 return extractValue<Value>(location);
341typename std::enable_if<!details::HasMemberTraits<Value>::value,
size_t>::type
344 return sizeof(Value);
353typename std::enable_if<details::HasMemberTraits<Value>::value,
size_t>::type
364ONIXS_B3_UMDF_MD_HOTPATH
365typename std::enable_if<!details::HasSerializeMember<Value>::value>::type
366commitValue(
void* location, Value value)
381ONIXS_B3_UMDF_MD_HOTPATH
382typename std::enable_if<details::HasSerializeMember<Value>::value>::type
383commitValue(
void* location, Value value)
387 value.serialize(location);
395ONIXS_B3_UMDF_MD_HOTPATH
396typename std::enable_if<!details::HasValueStaticMember<Value>::value>::type
397setValue(
void* location, Value value)
401 commitValue(location, value);
409ONIXS_B3_UMDF_MD_HOTPATH
410typename std::enable_if<details::HasValueStaticMember<Value>::value>::type
411setValue(
void* location, Value)
415 commitValue(location, Value::value());
#define ONIXS_B3_UMDF_MD_MESSAGING_NAMESPACE_END
#define ONIXS_B3_UMDF_MD_MESSAGING_NAMESPACE_BEGIN
#define CHECK_TYPE_INTEGRAL(Type)
UInt64 UInt64
8-byte unsigned integer, from 0 to 18446744073709551615 (2^64-1).
UInt16 Word
Alias for Word.
UInt64 QWord
Alias for Quad Word.
UInt32 DWord
Alias for Double Word.
UInt32 UInt32
4-byte unsigned integer, from 0 to 4294967295 (2^32-1).
UInt8 UInt8
1-byte unsigned integer, from 0 to 255.
UInt16 UInt16
2-byte unsigned integer, from 0 to 65535.
UInt8 Byte
Alias for Byte.