16#ifdef JPH_OBJECT_STREAM
38 result = stream->
Write((
void *)&inObject, GetRTTI(&inObject));
50 stream.open(inFileName, std::ofstream::out | std::ofstream::trunc | std::ofstream::binary);
51 if (!stream.is_open())
53 return sWriteObject(stream, inType, inObject);
61 bool Write(
const void *inObject,
const RTTI *inRTTI);
62 void WriteObject(
const void *inObject);
63 void QueueRTTI(
const RTTI *inRTTI);
64 void WriteRTTI(
const RTTI *inRTTI);
80 ObjectInfo() : mIdentifier(0), mRTTI(
nullptr) { }
81 ObjectInfo(
Identifier inIdentifier,
const RTTI *inRTTI) : mIdentifier(inIdentifier), mRTTI(inRTTI) { }
92 Identifier mNextIdentifier = sNullIdentifier + 1;
93 IdentifierMap mIdentifierMap;
94 ObjectQueue mObjectQueue;
96 ClassQueue mClassQueue;
#define JPH_EXPORT
Definition Core.h:271
#define JPH_SUPPRESS_WARNINGS_STD_BEGIN
Definition Core.h:419
#define JPH_SUPPRESS_WARNINGS_STD_END
Definition Core.h:431
#define JPH_NAMESPACE_END
Definition Core.h:414
#define JPH_NAMESPACE_BEGIN
Definition Core.h:408
Interface class for writing to an object stream.
Definition ObjectStream.h:76
virtual void WritePointerData(const RTTI *inRTTI, const void *inPointer)=0
virtual void WriteClassData(const RTTI *inRTTI, const void *inInstance)=0
uint32 Identifier
Identifier for objects.
Definition ObjectStream.h:33
EStreamType
Stream type.
Definition ObjectStream.h:23
Definition ObjectStreamOut.h:23
bool Write(const void *inObject, const RTTI *inRTTI)
Definition ObjectStreamOut.cpp:35
static bool sWriteObject(const char *inFileName, ObjectStream::EStreamType inType, const T &inObject)
Main function to write an object to a file.
Definition ObjectStreamOut.h:47
static bool sWriteObject(ostream &inStream, ObjectStream::EStreamType inType, const T &inObject)
Main function to write an object to a stream.
Definition ObjectStreamOut.h:30
static ObjectStreamOut * Open(EStreamType inType, ostream &inStream)
Static constructor.
Definition ObjectStreamOut.cpp:24
ostream & mStream
Definition ObjectStreamOut.h:75
Definition UnorderedMap.h:30
Definition UnorderedSet.h:29