33 static constexpr int sVersion = 1;
34 static constexpr int sRevision = 0;
112#define JPH_DECLARE_PRIMITIVE(name) \
113 JPH_EXPORT bool OSIsType(name *, int inArrayDepth, EOSDataType inDataType, const char *inClassName); \
114 JPH_EXPORT bool OSReadData(IObjectStreamIn &ioStream, name &outPrimitive); \
115 JPH_EXPORT void OSWriteDataType(IObjectStreamOut &ioStream, name *); \
116 JPH_EXPORT void OSWriteData(IObjectStreamOut &ioStream, const name &inPrimitive);
128template <
class T, u
int N>
134template <
class T, u
int N>
175template <
class T, u
int N>
201template <
class T, u
int N>
223 return ioStream.ReadPointerData(
JPH_RTTI(
T),
inRef.InternalGetPointer(), T::sInternalGetRefCountOffset());
229 return ioStream.ReadPointerData(
JPH_RTTI(
T),
inRef.InternalGetPointer(), T::sInternalGetRefCountOffset());
255template <
class T, u
int N>
262template <
class T, u
int N>
277template <
class T, u
int N>
284template <
class T, u
int N>
308 if (
inRef !=
nullptr)
311 ioStream.WritePointerData(
nullptr,
nullptr);
323 if (
inRef !=
nullptr)
326 ioStream.WritePointerData(
nullptr,
nullptr);
std::uint8_t uint8
Definition Core.h:440
#define JPH_EXPORT
Definition Core.h:227
std::uint64_t uint64
Definition Core.h:443
#define JPH_NAMESPACE_END
Definition Core.h:367
std::uint32_t uint32
Definition Core.h:442
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
std::uint16_t uint16
Definition Core.h:441
AllocateFunction Allocate
Definition Memory.cpp:59
bool OSIsType(Array< T > *, int inArrayDepth, EOSDataType inDataType, const char *inClassName)
Definition ObjectStream.h:123
void OSWriteData(IObjectStreamOut &ioStream, const Array< T > &inArray)
Definition ObjectStream.h:241
bool OSReadData(IObjectStreamIn &ioStream, Array< T > &inArray)
Define serialization templates for dynamic arrays.
Definition ObjectStream.h:154
void OSWriteDataType(IObjectStreamOut &ioStream, Array< T > *)
Definition ObjectStream.h:234
#define JPH_RTTI(class_name)
Definition RTTI.h:315
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
std::basic_string< char, std::char_traits< char >, STLAllocator< char > > String
Definition STLAllocator.h:82
EOSDataType
Data type.
Definition SerializableAttribute.h:15
@ Array
Used in attribute declaration, indicates that this is an array of objects.
Holds a 4x4 matrix of floats with the last column consisting of doubles.
Definition DMat44.h:13
Class that holds 3 doubles. Used as a storage class. Convert to DVec3 for calculations.
Definition Double3.h:13
Class that holds 3 floats. Used as a storage class. Convert to Vec3 for calculations.
Definition Float3.h:13
Interface class for reading from an object stream.
Definition ObjectStream.h:40
virtual bool ReadPrimitiveData(Quat &outPrimitive)=0
virtual bool ReadDataType(EOSDataType &outType)=0
virtual bool ReadPrimitiveData(double &outPrimitive)=0
virtual bool ReadPointerData(const RTTI *inRTTI, void **inPointer, int inRefCountOffset=-1)=0
virtual bool ReadPrimitiveData(Vec3 &outPrimitive)=0
virtual bool ReadPrimitiveData(String &outPrimitive)=0
virtual bool ReadPrimitiveData(uint64 &outPrimitive)=0
virtual bool ReadIdentifier(Identifier &outIdentifier)=0
virtual bool ReadPrimitiveData(Float3 &outPrimitive)=0
virtual bool ReadPrimitiveData(uint32 &outPrimitive)=0
virtual bool ReadPrimitiveData(float &outPrimitive)=0
virtual bool ReadPrimitiveData(DMat44 &outPrimitive)=0
virtual bool ReadPrimitiveData(int &outPrimitive)=0
virtual bool ReadName(String &outName)=0
virtual bool ReadPrimitiveData(Mat44 &outPrimitive)=0
virtual bool ReadPrimitiveData(DVec3 &outPrimitive)=0
virtual bool ReadCount(uint32 &outCount)=0
virtual bool ReadPrimitiveData(uint16 &outPrimitive)=0
virtual bool ReadClassData(const char *inClassName, void *inInstance)=0
virtual bool ReadPrimitiveData(Double3 &outPrimitive)=0
virtual bool ReadPrimitiveData(uint8 &outPrimitive)=0
virtual bool ReadPrimitiveData(Vec4 &outPrimitive)=0
virtual bool ReadPrimitiveData(bool &outPrimitive)=0
Interface class for writing to an object stream.
Definition ObjectStream.h:74
virtual void WritePrimitiveData(const int &inPrimitive)=0
virtual void WritePrimitiveData(const float &inPrimitive)=0
virtual void WritePrimitiveData(const Vec3 &inPrimitive)=0
virtual void WritePointerData(const RTTI *inRTTI, const void *inPointer)=0
virtual void WritePrimitiveData(const DVec3 &inPrimitive)=0
virtual void WritePrimitiveData(const String &inPrimitive)=0
virtual void WritePrimitiveData(const Quat &inPrimitive)=0
virtual void WritePrimitiveData(const uint8 &inPrimitive)=0
virtual void WritePrimitiveData(const Float3 &inPrimitive)=0
virtual void WritePrimitiveData(const Mat44 &inPrimitive)=0
virtual void WritePrimitiveData(const DMat44 &inPrimitive)=0
virtual void WritePrimitiveData(const uint32 &inPrimitive)=0
virtual void WriteClassData(const RTTI *inRTTI, const void *inInstance)=0
virtual void WriteIdentifier(Identifier inIdentifier)=0
virtual void WritePrimitiveData(const Vec4 &inPrimitive)=0
virtual void WriteDataType(EOSDataType inType)=0
virtual void WriteCount(uint32 inCount)=0
virtual void WriteName(const char *inName)=0
virtual void HintNextItem()
Definition ObjectStream.h:106
virtual void WritePrimitiveData(const uint16 &inPrimitive)=0
virtual void HintIndentUp()
Definition ObjectStream.h:107
virtual void WritePrimitiveData(const bool &inPrimitive)=0
virtual void WritePrimitiveData(const double &inPrimitive)=0
virtual void HintIndentDown()
Definition ObjectStream.h:108
virtual void WritePrimitiveData(const uint64 &inPrimitive)=0
virtual void WritePrimitiveData(const Double3 &inPrimitive)=0
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11
Base class for object stream input and output streams.
Definition ObjectStream.h:17
uint32 Identifier
Identifier for objects.
Definition ObjectStream.h:31
virtual ~ObjectStream()=default
Destructor.
EStreamType
Stream type.
Definition ObjectStream.h:21
Definition Reference.h:151
Definition Reference.h:101
Simple variable length array backed by a fixed size buffer.
Definition StaticArray.h:12
T value_type
Definition StaticArray.h:14