7#ifdef JPH_OBJECT_STREAM
19template <
class MemberType>
27 [](
int inArrayDepth,
EOSDataType inDataType,
const char *inClassName)
29 return OSIsType((MemberType *)
nullptr, inArrayDepth, inDataType, inClassName);
33 return OSReadData(ioStream, *
reinterpret_cast<MemberType *
>(inObject));
37 OSWriteData(ioStream, *
reinterpret_cast<const MemberType *
>(inObject));
46#define JPH_ADD_ATTRIBUTE_WITH_ALIAS(class_name, member_name, alias_name) \
47 AddSerializableAttributeTyped<decltype(class_name::member_name)>(inRTTI, offsetof(class_name, member_name), alias_name);
50#define JPH_ADD_ATTRIBUTE(class_name, member_name) \
51 JPH_ADD_ATTRIBUTE_WITH_ALIAS(class_name, member_name, #member_name)
57#define JPH_ADD_ATTRIBUTE_WITH_ALIAS(...)
58#define JPH_ADD_ATTRIBUTE(...)
unsigned int uint
Definition: Core.h:452
#define JPH_NAMESPACE_END
Definition: Core.h:378
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
JPH_NAMESPACE_BEGIN const RTTI * GetPrimitiveTypeOfType(T *)
Helper functions to get the underlying RTTI type of a type (so e.g. Array<sometype> will return somet...
Definition: GetPrimitiveTypeOfType.h:13
bool OSIsType(Array< T, A > *, int inArrayDepth, EOSDataType inDataType, const char *inClassName)
Definition: ObjectStream.h:125
bool OSReadData(IObjectStreamIn &ioStream, Array< T, A > &inArray)
Define serialization templates for dynamic arrays.
Definition: ObjectStream.h:156
void OSWriteData(IObjectStreamOut &ioStream, const Array< T, A > &inArray)
Definition: ObjectStream.h:243
void OSWriteDataType(IObjectStreamOut &ioStream, Array< T, A > *)
Definition: ObjectStream.h:236
EOSDataType
Data type.
Definition: SerializableAttribute.h:17
JPH_NAMESPACE_BEGIN void AddSerializableAttributeTyped(RTTI &inRTTI, uint inOffset, const char *inName)
Definition: SerializableAttributeTyped.h:20
Interface class for reading from an object stream.
Definition: ObjectStream.h:42
Interface class for writing to an object stream.
Definition: ObjectStream.h:76
void AddAttribute(const SerializableAttribute &inAttribute)
Attribute access.
Definition: RTTI.cpp:132
Attributes are members of classes that need to be serialized.
Definition: SerializableAttribute.h:37