16template <
class MemberType>
24 [](
int inArrayDepth,
EOSDataType inDataType, [[maybe_unused]]
const char *inClassName)
26 return inArrayDepth == 0 && inDataType == EOSDataType::T_uint32;
33 *
reinterpret_cast<MemberType *
>(inObject) =
static_cast<MemberType
>(temporary);
40 static_assert(
sizeof(MemberType) <=
sizeof(
uint32));
41 uint32 temporary =
uint32(*
reinterpret_cast<const MemberType *
>(inObject));
46 ioStream.WriteDataType(EOSDataType::T_uint32);
51#define JPH_ADD_ENUM_ATTRIBUTE(class_name, member_name) \
52 AddSerializableAttributeEnum<decltype(class_name::member_name)>(inRTTI, offsetof(class_name, member_name), #member_name);
uint32_t uint32
Definition Core.h:312
unsigned int uint
Definition Core.h:309
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
void OSWriteData(IObjectStreamOut &ioStream, const Array< T > &inArray)
Definition ObjectStream.h:238
bool OSReadData(IObjectStreamIn &ioStream, Array< T > &inArray)
Define serialization templates for dynamic arrays.
Definition ObjectStream.h:153
EOSDataType
Data type.
Definition SerializableAttribute.h:15
JPH_NAMESPACE_BEGIN void AddSerializableAttributeEnum(RTTI &inRTTI, uint inOffset, const char *inName)
Definition SerializableAttributeEnum.h:17
Interface class for reading from an object stream.
Definition ObjectStream.h:39
Interface class for writing to an object stream.
Definition ObjectStream.h:73
void AddAttribute(const SerializableAttribute &inAttribute)
Attribute access.
Definition RTTI.cpp:128
Attributes are members of classes that need to be serialized.
Definition SerializableAttribute.h:35