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

#include <ObjectStreamOut.h>

Inheritance diagram for ObjectStreamOut:
IObjectStreamOut ObjectStream NonCopyable ObjectStreamBinaryOut ObjectStreamTextOut

Static Public Member Functions

template<class T >
static bool sWriteObject (ostream &inStream, ObjectStream::EStreamType inType, const T &inObject)
 Main function to write an object to a stream.
 
template<class T >
static bool sWriteObject (const char *inFileName, ObjectStream::EStreamType inType, const T &inObject)
 Main function to write an object to a file.
 

Serialization operations

ostream & mStream
 
bool Write (const void *inObject, const RTTI *inRTTI)
 
void WriteObject (const void *inObject)
 
void QueueRTTI (const RTTI *inRTTI)
 
void WriteRTTI (const RTTI *inRTTI)
 
virtual void WriteClassData (const RTTI *inRTTI, const void *inInstance) override
 
virtual void WritePointerData (const RTTI *inRTTI, const void *inPointer) override
 
static ObjectStreamOutOpen (EStreamType inType, ostream &inStream)
 Static constructor.
 
 ObjectStreamOut (ostream &inStream)
 Constructor.
 

Additional Inherited Members

- Public Types inherited from ObjectStream
enum class  EStreamType { Text , Binary }
 Stream type. More...
 
- Public Member Functions inherited from IObjectStreamOut
virtual void WriteDataType (EOSDataType inType)=0
 
virtual void WriteName (const char *inName)=0
 
virtual void WriteIdentifier (Identifier inIdentifier)=0
 
virtual void WriteCount (uint32 inCount)=0
 
virtual void WritePrimitiveData (const uint8 &inPrimitive)=0
 
virtual void WritePrimitiveData (const uint16 &inPrimitive)=0
 
virtual void WritePrimitiveData (const int &inPrimitive)=0
 
virtual void WritePrimitiveData (const uint32 &inPrimitive)=0
 
virtual void WritePrimitiveData (const uint64 &inPrimitive)=0
 
virtual void WritePrimitiveData (const float &inPrimitive)=0
 
virtual void WritePrimitiveData (const double &inPrimitive)=0
 
virtual void WritePrimitiveData (const bool &inPrimitive)=0
 
virtual void WritePrimitiveData (const String &inPrimitive)=0
 
virtual void WritePrimitiveData (const Float3 &inPrimitive)=0
 
virtual void WritePrimitiveData (const Double3 &inPrimitive)=0
 
virtual void WritePrimitiveData (const Vec3 &inPrimitive)=0
 
virtual void WritePrimitiveData (const DVec3 &inPrimitive)=0
 
virtual void WritePrimitiveData (const Vec4 &inPrimitive)=0
 
virtual void WritePrimitiveData (const Quat &inPrimitive)=0
 
virtual void WritePrimitiveData (const Mat44 &inPrimitive)=0
 
virtual void WritePrimitiveData (const DMat44 &inPrimitive)=0
 
virtual void HintNextItem ()
 
virtual void HintIndentUp ()
 
virtual void HintIndentDown ()
 
- 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

ObjectStreamOut contains all logic for writing an object to disk. It is the base class for the text and binary output streams (ObjectStreamTextOut and ObjectStreamBinaryOut).

Constructor & Destructor Documentation

◆ ObjectStreamOut()

JPH_NAMESPACE_BEGIN ObjectStreamOut::ObjectStreamOut ( ostream &  inStream)
explicitprotected

Constructor.

Member Function Documentation

◆ Open()

ObjectStreamOut * ObjectStreamOut::Open ( EStreamType  inType,
ostream &  inStream 
)
staticprotected

Static constructor.

◆ QueueRTTI()

void ObjectStreamOut::QueueRTTI ( const RTTI inRTTI)

◆ sWriteObject() [1/2]

template<class T >
static bool ObjectStreamOut::sWriteObject ( const char *  inFileName,
ObjectStream::EStreamType  inType,
const T &  inObject 
)
inlinestatic

Main function to write an object to a file.

◆ sWriteObject() [2/2]

template<class T >
static bool ObjectStreamOut::sWriteObject ( ostream &  inStream,
ObjectStream::EStreamType  inType,
const T &  inObject 
)
inlinestatic

Main function to write an object to a stream.

◆ Write()

bool ObjectStreamOut::Write ( const void *  inObject,
const RTTI inRTTI 
)

◆ WriteClassData()

void ObjectStreamOut::WriteClassData ( const RTTI inRTTI,
const void *  inInstance 
)
overridevirtual

Implements IObjectStreamOut.

◆ WriteObject()

void ObjectStreamOut::WriteObject ( const void *  inObject)

◆ WritePointerData()

void ObjectStreamOut::WritePointerData ( const RTTI inRTTI,
const void *  inPointer 
)
overridevirtual

Implements IObjectStreamOut.

◆ WriteRTTI()

void ObjectStreamOut::WriteRTTI ( const RTTI inRTTI)

Member Data Documentation

◆ mStream

ostream& ObjectStreamOut::mStream
protected

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