PxSerializerDefaultAdapter< T > Class Template Reference

Default PxSerializer implementation. More...

#include <PxSerializer.h>

Inheritance diagram for PxSerializerDefaultAdapter< T >:
Collaboration diagram for PxSerializerDefaultAdapter< T >:

Public Member Functions

Basics needed for Binary- and RepX-Serialization
 PxSerializerDefaultAdapter (const char *name)
 
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type. More...
 
virtual void requiresObjects (PxBase &obj, PxProcessPxBaseCallback &c) const
 Adds required objects to the collection. More...
 
virtual bool isSubordinate () const
 Whether the object is subordinate. More...
 
Functionality needed for Binary Serialization only
virtual void exportExtraData (PxBase &obj, PxSerializationContext &s) const
 Exports object's extra data to stream. More...
 
virtual void exportData (PxBase &obj, PxSerializationContext &s) const
 Exports object's data to stream. More...
 
virtual void registerReferences (PxBase &obj, PxSerializationContext &s) const
 Register references that the object maintains to other objects. More...
 
virtual size_t getClassSize () const
 Returns size needed to create the class instance. More...
 
virtual PxBasecreateObject (PxU8 *&address, PxDeserializationContext &context) const
 Create object at a given address, resolve references and import extra data. More...
 
- Public Member Functions inherited from PxSerializer
virtual ~PxSerializer ()
 

Private Attributes

const char * mTypeName
 

Detailed Description

template<class T>
class PxSerializerDefaultAdapter< T >

Default PxSerializer implementation.

Constructor & Destructor Documentation

◆ PxSerializerDefaultAdapter()

template<class T >
PxSerializerDefaultAdapter< T >::PxSerializerDefaultAdapter ( const char *  name)
inline

Member Function Documentation

◆ createObject()

template<class T >
virtual PxBase* PxSerializerDefaultAdapter< T >::createObject ( PxU8 *&  address,
PxDeserializationContext context 
) const
inlinevirtual

Create object at a given address, resolve references and import extra data.

Parameters
addressLocation at which object is created. Address is increased by the size of the created object.
contextContext for reading external data and resolving references.
Returns
Created PxBase pointer (needs to be identical to address before increment).

Implements PxSerializer.

◆ exportData()

template<class T >
virtual void PxSerializerDefaultAdapter< T >::exportData ( PxBase ,
PxSerializationContext  
) const
inlinevirtual

◆ exportExtraData()

template<class T >
virtual void PxSerializerDefaultAdapter< T >::exportExtraData ( PxBase ,
PxSerializationContext  
) const
inlinevirtual

Exports object's extra data to stream.

Implements PxSerializer.

◆ getClassSize()

template<class T >
virtual size_t PxSerializerDefaultAdapter< T >::getClassSize ( ) const
inlinevirtual

Returns size needed to create the class instance.

Returns
sizeof class instance.

Implements PxSerializer.

◆ getConcreteTypeName()

template<class T >
virtual const char* PxSerializerDefaultAdapter< T >::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Implements PxSerializer.

◆ isSubordinate()

template<class T >
virtual bool PxSerializerDefaultAdapter< T >::isSubordinate ( ) const
inlinevirtual

Whether the object is subordinate.

A class is subordinate, if it can only be instantiated in the context of another class.

Returns
Whether the class is subordinate
See also
PxSerialization::isSerializable

Implements PxSerializer.

◆ registerReferences()

template<class T >
virtual void PxSerializerDefaultAdapter< T >::registerReferences ( PxBase obj,
PxSerializationContext s 
) const
inlinevirtual

Register references that the object maintains to other objects.

Implements PxSerializer.

References PX_ASSERT, PX_SERIAL_REF_KIND_PXBASE, and PxSerializationContext::registerReference().

◆ requiresObjects()

template<class T >
virtual void PxSerializerDefaultAdapter< T >::requiresObjects ( PxBase ,
PxProcessPxBaseCallback  
) const
inlinevirtual

Adds required objects to the collection.

This method does not add the required objects recursively, e.g. objects required by required objects.

See also
PxCollection, PxSerialization::complete

Implements PxSerializer.

Member Data Documentation

◆ mTypeName

template<class T >
const char* PxSerializerDefaultAdapter< T >::mTypeName
private

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