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
217 template <
unsigned ArgsCount>
218 struct CompositeExtractor;
222 struct CompositeExtractor<1>
224 template <
class Value>
229 #if defined (ONIXS_ILINK3_CXX11) 233 std::declval<typename Value::MemberTraits::FirstArgType>()
243 extractValue<typename Value::MemberTraits::FirstArgType>(location)
250 struct CompositeExtractor<2>
252 template <
class Value>
256 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
257 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
259 #if defined (ONIXS_ILINK3_CXX11) 263 std::declval<FirstArgType>(),
264 std::declval<SecondArgType>()
274 extractValue<FirstArgType>(location),
275 extractValue<SecondArgType>(
276 advanceByBytes(location,
sizeof(FirstArgType)))
283 struct CompositeExtractor<4>
285 template <
class Value>
289 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
290 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
291 typedef typename Value::MemberTraits::ThirdArgType ThirdArgType;
292 typedef typename Value::MemberTraits::FourthArgType FourthArgType;
294 #if defined (ONIXS_ILINK3_CXX11) 298 std::declval<FirstArgType>(),
299 std::declval<SecondArgType>(),
300 std::declval<ThirdArgType>(),
301 std::declval<FourthArgType>()
311 extractValue<FirstArgType>(location),
312 extractValue<SecondArgType>(
313 advanceByBytes(location,
sizeof(FirstArgType))),
314 extractValue<ThirdArgType>(
315 advanceByBytes(location,
sizeof(FirstArgType) +
sizeof(SecondArgType))),
316 extractValue<FourthArgType>(
317 advanceByBytes(location,
sizeof(FirstArgType) +
sizeof(SecondArgType) +
sizeof(ThirdArgType)))
328 typename EnableIf<details::HasMemberTraits<Value>::value, Value>::type
332 return CompositeExtractor<Value::MemberTraits::Count>:: template extract<Value>(location);
341 typename EnableIf<!details::HasMemberTraits<Value>::value, Value>::type
345 return extractValue<Value>(location);
354 typename EnableIf<!details::HasMemberTraits<Value>::value,
size_t>::type
357 return sizeof(Value);
366 typename EnableIf<details::HasMemberTraits<Value>::value,
size_t>::type
378 typename EnableIf<!details::HasSerializeMember<Value>::value>::type
379 commitValue(
void* location, Value value)
395 typename EnableIf<details::HasSerializeMember<Value>::value>::type
396 commitValue(
void* location, Value value)
400 value.serialize(location);
409 typename EnableIf<!details::HasValueStaticMember<Value>::value>::type
410 setValue(
void* location, Value value)
414 commitValue(location, value);
423 typename EnableIf<details::HasValueStaticMember<Value>::value>::type
424 setValue(
void* location, Value)
428 commitValue(location, Value::value());
#define ONIXS_ILINK3_CONSTEXPR
UInt8 Byte
Alias for Byte.
#define ONIXS_ILINK3_PURE
UInt64 QWord
Alias for Quad Word.
UInt16 Word
Alias for Word.
#define ONIXS_ILINK3_MESSAGING_NAMESPACE_END
UInt32 DWord
Alias for Double Word.
#define ONIXS_ILINK3_MESSAGING_NAMESPACE_BEGIN
#define ONIXS_ILINK3_HOTPATH
#define ONIXS_ILINK3_NOTHROW
#define CHECK_TYPE_INTEGRAL(Type)