Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ObjectStreamIn Class Reference

#include <ObjectStreamIn.h>

Inheritance diagram for ObjectStreamIn:
IObjectStreamIn ObjectStream NonCopyable ObjectStreamBinaryIn ObjectStreamTextIn

Static Public Member Functions

template<class T >
static bool sReadObject (istream &inStream, T *&outObject)
 Main function to read an object from a stream.
 
template<class T >
static bool sReadObject (istream &inStream, Ref< T > &outObject)
 Main function to read an object from a stream (reference counting pointer version)
 
template<class T >
static bool sReadObject (const char *inFileName, T *&outObject)
 Main function to read an object from a file.
 
template<class T >
static bool sReadObject (const char *inFileName, Ref< T > &outObject)
 Main function to read an object from a file (reference counting pointer version)
 

Serialization operations

istream & mStream
 
void * Read (const RTTI *inRTTI)
 
void * ReadObject (const RTTI *&outRTTI)
 
bool ReadRTTI ()
 
virtual bool ReadClassData (const char *inClassName, void *inInstance) override
 
bool ReadClassData (const ClassDescription &inClassDesc, void *inInstance)
 
virtual bool ReadPointerData (const RTTI *inRTTI, void **inPointer, int inRefCountOffset=-1) override
 
bool SkipAttributeData (int inArrayDepth, EOSDataType inDataType, const char *inClassName)
 
 ObjectStreamIn (istream &inStream)
 Constructor.
 
static bool GetInfo (istream &inStream, EStreamType &outType, int &outVersion, int &outRevision)
 Determine the type and version of an object stream.
 
static ObjectStreamInOpen (istream &inStream)
 Static constructor.
 

Additional Inherited Members

- Public Types inherited from ObjectStream
enum class  EStreamType { Text , Binary }
 Stream type. More...
 
- Public Member Functions inherited from IObjectStreamIn
virtual bool ReadDataType (EOSDataType &outType)=0
 
virtual bool ReadName (String &outName)=0
 
virtual bool ReadIdentifier (Identifier &outIdentifier)=0
 
virtual bool ReadCount (uint32 &outCount)=0
 
virtual bool ReadPrimitiveData (uint8 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (uint16 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (int &outPrimitive)=0
 
virtual bool ReadPrimitiveData (uint32 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (uint64 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (float &outPrimitive)=0
 
virtual bool ReadPrimitiveData (double &outPrimitive)=0
 
virtual bool ReadPrimitiveData (bool &outPrimitive)=0
 
virtual bool ReadPrimitiveData (String &outPrimitive)=0
 
virtual bool ReadPrimitiveData (Float3 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (Double3 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (Vec3 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (DVec3 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (Vec4 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (Quat &outPrimitive)=0
 
virtual bool ReadPrimitiveData (Mat44 &outPrimitive)=0
 
virtual bool ReadPrimitiveData (DMat44 &outPrimitive)=0
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 
- Protected Types inherited from ObjectStream
using Identifier = uint32
 Identifier for objects.
 
- Protected Member Functions inherited from ObjectStream
virtual ~ObjectStream ()=default
 Destructor.
 
- Static Protected Attributes inherited from ObjectStream
static constexpr int sVersion = 1
 
static constexpr int sRevision = 0
 
static constexpr Identifier sNullIdentifier = 0
 

Detailed Description

ObjectStreamIn contains all logic for reading an object from disk. It is the base class for the text and binary input streams (ObjectStreamTextIn and ObjectStreamBinaryIn).

Constructor & Destructor Documentation

◆ ObjectStreamIn()

JPH_NAMESPACE_BEGIN ObjectStreamIn::ObjectStreamIn ( istream &  inStream)
explicitprotected

Constructor.

Member Function Documentation

◆ GetInfo()

bool ObjectStreamIn::GetInfo ( istream &  inStream,
EStreamType outType,
int &  outVersion,
int &  outRevision 
)
staticprotected

Determine the type and version of an object stream.

◆ Open()

ObjectStreamIn * ObjectStreamIn::Open ( istream &  inStream)
staticprotected

Static constructor.

◆ Read()

void * ObjectStreamIn::Read ( const RTTI inRTTI)

◆ ReadClassData() [1/2]

bool ObjectStreamIn::ReadClassData ( const char *  inClassName,
void *  inInstance 
)
overridevirtual

Implements IObjectStreamIn.

◆ ReadClassData() [2/2]

bool ObjectStreamIn::ReadClassData ( const ClassDescription &  inClassDesc,
void *  inInstance 
)

◆ ReadObject()

void * ObjectStreamIn::ReadObject ( const RTTI *&  outRTTI)

◆ ReadPointerData()

bool ObjectStreamIn::ReadPointerData ( const RTTI inRTTI,
void **  inPointer,
int  inRefCountOffset = -1 
)
overridevirtual

Implements IObjectStreamIn.

◆ ReadRTTI()

bool ObjectStreamIn::ReadRTTI ( )

◆ SkipAttributeData()

bool ObjectStreamIn::SkipAttributeData ( int  inArrayDepth,
EOSDataType  inDataType,
const char *  inClassName 
)

◆ sReadObject() [1/4]

template<class T >
static bool ObjectStreamIn::sReadObject ( const char *  inFileName,
Ref< T > &  outObject 
)
inlinestatic

Main function to read an object from a file (reference counting pointer version)

◆ sReadObject() [2/4]

template<class T >
static bool ObjectStreamIn::sReadObject ( const char *  inFileName,
T *&  outObject 
)
inlinestatic

Main function to read an object from a file.

◆ sReadObject() [3/4]

template<class T >
static bool ObjectStreamIn::sReadObject ( istream &  inStream,
Ref< T > &  outObject 
)
inlinestatic

Main function to read an object from a stream (reference counting pointer version)

◆ sReadObject() [4/4]

template<class T >
static bool ObjectStreamIn::sReadObject ( istream &  inStream,
T *&  outObject 
)
inlinestatic

Main function to read an object from a stream.

Member Data Documentation

◆ mStream

istream& ObjectStreamIn::mStream
protected

The documentation for this class was generated from the following files: