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