58 return static_cast<void*
>(ptr);
70toOpaquePtr(
const Type* ptr)
74 return static_cast<const void*
>(ptr);
106toByteBlock(
const Type* ptr)
129 return reinterpret_cast<Type*
>(toByteBlock(pointer) + distance);
150 reinterpret_cast<Type*
>
152 toByteBlock(pointer) - distance
204template <
unsigned ArgsCount>
205struct CompositeExtractor;
209struct CompositeExtractor<1>
211 template <
class Value>
213 Value extract(
const void* location)
216#if defined (ONIXS_CONFLATEDTCP_CXX11)
220 std::declval<typename Value::MemberTraits::FirstArgType>()
230 extractValue<typename Value::MemberTraits::FirstArgType>(location)
237struct CompositeExtractor<2>
239 template <
class Value>
243 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
244 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
246#if defined (ONIXS_CONFLATEDTCP_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>
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_CONFLATEDTCP_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)))
315typename EnableIf<details::HasMemberTraits<Value>::value, Value>::type
319 return CompositeExtractor<Value::MemberTraits::Count>:: template extract<Value>(location);
328typename EnableIf<!details::HasMemberTraits<Value>::value, Value>::type
332 return extractValue<Value>(location);
341typename EnableIf<!details::HasMemberTraits<Value>::value,
size_t>::type
344 return sizeof(Value);
353typename EnableIf<details::HasMemberTraits<Value>::value,
size_t>::type
365typename EnableIf<!details::HasSerializeMember<Value>::value>::type
366commitValue(
void* location, Value value)
382typename EnableIf<details::HasSerializeMember<Value>::value>::type
383commitValue(
void* location, Value value)
387 value.serialize(location);
396typename EnableIf<!details::HasValueStaticMember<Value>::value>::type
397setValue(
void* location, Value value)
401 commitValue(location, value);
410typename EnableIf<details::HasValueStaticMember<Value>::value>::type
411setValue(
void* location, Value)
415 commitValue(location, Value::value());
#define ONIXS_CONFLATEDTCP_MESSAGING_NAMESPACE_BEGIN
#define ONIXS_CONFLATEDTCP_MESSAGING_NAMESPACE_END
#define ONIXS_CONFLATEDTCP_PURE
#define ONIXS_CONFLATEDTCP_CONSTEXPR
#define ONIXS_CONFLATEDTCP_NOTHROW
#define ONIXS_CONFLATEDTCP_HOTPATH
UInt16 Word
Alias for Word.
UInt64 QWord
Alias for Quad Word.
UInt32 DWord
Alias for Double Word.
UInt8 Byte
Alias for Byte.