23 struct ClassDescription;
37 result = (outObject !=
nullptr);
55 static bool sReadObject(
const char *inFileName, T *&outObject)
58 stream.open(inFileName, std::ifstream::in | std::ifstream::binary);
59 if (!stream.is_open())
82 virtual bool ReadClassData(
const char *inClassName,
void *inInstance)
override;
83 bool ReadClassData(
const ClassDescription &inClassDesc,
void *inInstance);
84 virtual bool ReadPointerData(
const RTTI *inRTTI,
void **inPointer,
int inRefCountOffset = -1)
override;
92 static bool GetInfo(istream &inStream,
EStreamType &outType,
int &outVersion,
int &outRevision);
101 struct AttributeDescription
110 struct ClassDescription
112 ClassDescription() =
default;
113 explicit ClassDescription(
const RTTI *inRTTI) : mRTTI(inRTTI) { }
115 const RTTI * mRTTI =
nullptr;
121 ObjectInfo() =
default;
122 ObjectInfo(
void *inInstance,
const RTTI *inRTTI) : mInstance(inInstance), mRTTI(inRTTI) { }
124 void * mInstance =
nullptr;
125 const RTTI * mRTTI =
nullptr;
139 ClassDescriptionMap mClassDescriptionMap;
140 IdentifierMap mIdentifierMap;
#define JPH_SUPPRESS_WARNINGS_STD_BEGIN
Definition Core.h:245
#define JPH_SUPPRESS_WARNINGS_STD_END
Definition Core.h:255
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.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
@ Invalid
Next token on the stream was not a valid data type.
std::unordered_map< Key, T, Hash, KeyEqual, STLAllocator< pair< const Key, T > > > UnorderedMap
Definition UnorderedMap.h:13
Interface class for reading from an object stream.
Definition ObjectStream.h:39
uint32 Identifier
Identifier for objects.
Definition ObjectStream.h:30
EStreamType
Stream type.
Definition ObjectStream.h:20
Definition ObjectStreamIn.h:21
static ObjectStreamIn * Open(istream &inStream)
Static constructor.
Definition ObjectStreamIn.cpp:51
void * Read(const RTTI *inRTTI)
Definition ObjectStreamIn.cpp:78
void * ReadObject(const RTTI *&outRTTI)
Definition ObjectStreamIn.cpp:193
static bool GetInfo(istream &inStream, EStreamType &outType, int &outVersion, int &outRevision)
Determine the type and version of an object stream.
Definition ObjectStreamIn.cpp:21
virtual bool ReadPointerData(const RTTI *inRTTI, void **inPointer, int inRefCountOffset=-1) override
Definition ObjectStreamIn.cpp:403
static bool sReadObject(const char *inFileName, T *&outObject)
Main function to read an object from a file.
Definition ObjectStreamIn.h:55
virtual bool ReadClassData(const char *inClassName, void *inInstance) override
Definition ObjectStreamIn.cpp:346
static bool sReadObject(istream &inStream, Ref< T > &outObject)
Main function to read an object from a stream (reference counting pointer version)
Definition ObjectStreamIn.h:45
bool ReadRTTI()
Definition ObjectStreamIn.cpp:251
ObjectStreamIn(istream &inStream)
Constructor.
Definition ObjectStreamIn.cpp:16
static bool sReadObject(istream &inStream, T *&outObject)
Main function to read an object from a stream.
Definition ObjectStreamIn.h:28
static bool sReadObject(const char *inFileName, Ref< T > &outObject)
Main function to read an object from a file (reference counting pointer version)
Definition ObjectStreamIn.h:66
istream & mStream
Definition ObjectStreamIn.h:97
bool SkipAttributeData(int inArrayDepth, EOSDataType inDataType, const char *inClassName)
Definition ObjectStreamIn.cpp:429
Definition Reference.h:101