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

Attributes are members of classes that need to be serialized. More...

#include <SerializableAttribute.h>

Public Types

using pGetMemberPrimitiveType = const RTTI *(*)()
 @ Serialization functions More...
 
using pIsType = bool(*)(int inArrayDepth, EOSDataType inDataType, const char *inClassName)
 
using pReadData = bool(*)(IObjectStreamIn &ioStream, void *inObject)
 
using pWriteData = void(*)(IObjectStreamOut &ioStream, const void *inObject)
 
using pWriteDataType = void(*)(IObjectStreamOut &ioStream)
 

Public Member Functions

 SerializableAttribute (const char *inName, uint inMemberOffset, pGetMemberPrimitiveType inGetMemberPrimitiveType, pIsType inIsType, pReadData inReadData, pWriteData inWriteData, pWriteDataType inWriteDataType)
 Constructor. More...
 
 SerializableAttribute (const SerializableAttribute &inOther, int inBaseOffset)
 Construct from other attribute with base class offset. More...
 
void SetName (const char *inName)
 Name of the attribute. More...
 
const char * GetName () const
 
template<class T >
T * GetMemberPointer (void *inObject) const
 Access to the memory location that contains the member. More...
 
template<class T >
const T * GetMemberPointer (const void *inObject) const
 
const RTTIGetMemberPrimitiveType () const
 In case this attribute contains an RTTI type, return it (note that a Array<sometype> will return the rtti of sometype) More...
 
bool IsType (int inArrayDepth, EOSDataType inDataType, const char *inClassName) const
 Check if this attribute is of a specific type. More...
 
bool ReadData (IObjectStreamIn &ioStream, void *inObject) const
 Read the data for this attribute into attribute containing class inObject. More...
 
void WriteData (IObjectStreamOut &ioStream, const void *inObject) const
 Write the data for this attribute from attribute containing class inObject. More...
 
void WriteDataType (IObjectStreamOut &ioStream) const
 Write the data type of this attribute to a stream. More...
 

Detailed Description

Attributes are members of classes that need to be serialized.

Member Typedef Documentation

◆ pGetMemberPrimitiveType

@ Serialization functions

◆ pIsType

using SerializableAttribute::pIsType = bool (*)(int inArrayDepth, EOSDataType inDataType, const char *inClassName)

◆ pReadData

using SerializableAttribute::pReadData = bool (*)(IObjectStreamIn &ioStream, void *inObject)

◆ pWriteData

using SerializableAttribute::pWriteData = void (*)(IObjectStreamOut &ioStream, const void *inObject)

◆ pWriteDataType

Constructor & Destructor Documentation

◆ SerializableAttribute() [1/2]

SerializableAttribute::SerializableAttribute ( const char *  inName,
uint  inMemberOffset,
pGetMemberPrimitiveType  inGetMemberPrimitiveType,
pIsType  inIsType,
pReadData  inReadData,
pWriteData  inWriteData,
pWriteDataType  inWriteDataType 
)
inline

Constructor.

◆ SerializableAttribute() [2/2]

SerializableAttribute::SerializableAttribute ( const SerializableAttribute inOther,
int  inBaseOffset 
)
inline

Construct from other attribute with base class offset.

Member Function Documentation

◆ GetMemberPointer() [1/2]

template<class T >
const T * SerializableAttribute::GetMemberPointer ( const void *  inObject) const
inline

◆ GetMemberPointer() [2/2]

template<class T >
T * SerializableAttribute::GetMemberPointer ( void *  inObject) const
inline

Access to the memory location that contains the member.

◆ GetMemberPrimitiveType()

const RTTI * SerializableAttribute::GetMemberPrimitiveType ( ) const
inline

In case this attribute contains an RTTI type, return it (note that a Array<sometype> will return the rtti of sometype)

◆ GetName()

const char * SerializableAttribute::GetName ( ) const
inline

◆ IsType()

bool SerializableAttribute::IsType ( int  inArrayDepth,
EOSDataType  inDataType,
const char *  inClassName 
) const
inline

Check if this attribute is of a specific type.

◆ ReadData()

bool SerializableAttribute::ReadData ( IObjectStreamIn ioStream,
void *  inObject 
) const
inline

Read the data for this attribute into attribute containing class inObject.

◆ SetName()

void SerializableAttribute::SetName ( const char *  inName)
inline

Name of the attribute.

◆ WriteData()

void SerializableAttribute::WriteData ( IObjectStreamOut ioStream,
const void *  inObject 
) const
inline

Write the data for this attribute from attribute containing class inObject.

◆ WriteDataType()

void SerializableAttribute::WriteDataType ( IObjectStreamOut ioStream) const
inline

Write the data type of this attribute to a stream.


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