7#ifdef JPH_OBJECT_STREAM
18template <
class MemberType>
26 [](
int inArrayDepth,
EOSDataType inDataType, [[maybe_unused]]
const char *inClassName)
28 return inArrayDepth == 0 && inDataType == EOSDataType::T_uint32;
35 *
reinterpret_cast<MemberType *
>(inObject) =
static_cast<MemberType
>(temporary);
42 static_assert(
sizeof(MemberType) <=
sizeof(
uint32));
43 uint32 temporary =
uint32(*
reinterpret_cast<const MemberType *
>(inObject));
48 ioStream.WriteDataType(EOSDataType::T_uint32);
53#define JPH_ADD_ENUM_ATTRIBUTE_WITH_ALIAS(class_name, member_name, alias_name) \
54 AddSerializableAttributeEnum<decltype(class_name::member_name)>(inRTTI, offsetof(class_name, member_name), alias_name);
57#define JPH_ADD_ENUM_ATTRIBUTE(class_name, member_name) \
58 JPH_ADD_ENUM_ATTRIBUTE_WITH_ALIAS(class_name, member_name, #member_name);
64#define JPH_ADD_ENUM_ATTRIBUTE_WITH_ALIAS(...)
65#define JPH_ADD_ENUM_ATTRIBUTE(...)
unsigned int uint
Definition Core.h:481
#define JPH_NAMESPACE_END
Definition Core.h:414
std::uint32_t uint32
Definition Core.h:484
#define JPH_NAMESPACE_BEGIN
Definition Core.h:408
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
EOSDataType
Data type.
Definition SerializableAttribute.h:17
JPH_NAMESPACE_BEGIN void AddSerializableAttributeEnum(RTTI &inRTTI, uint inOffset, const char *inName)
Definition SerializableAttributeEnum.h:19
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