PxSerializationRegistry Class Referenceabstract

Class serving as a registry for XML (RepX) and binary serializable types. More...

#include <PxSerialFramework.h>

Public Member Functions

virtual void release ()=0
 Releases PxSerializationRegistry instance. More...
 
Binary Serialization Functionality
virtual void registerSerializer (PxType type, PxSerializer &serializer)=0
 Register a serializer for a concrete type. More...
 
virtual PxSerializerunregisterSerializer (PxType type)=0
 Unregister a serializer for a concrete type, and retrieves the corresponding serializer object. More...
 
virtual void registerBinaryMetaDataCallback (PxBinaryMetaDataCallback callback)=0
 Register binary meta data callback. More...
 
virtual const PxSerializergetSerializer (PxType type) const =0
 Returns PxSerializer corresponding to type. More...
 
RepX (XML) Serialization Functionality
virtual void registerRepXSerializer (PxType type, PxRepXSerializer &serializer)=0
 Register a RepX serializer for a concrete type. More...
 
virtual PxRepXSerializerunregisterRepXSerializer (PxType type)=0
 Unregister a RepX serializer for a concrete type, and retrieves the corresponding serializer object. More...
 
virtual PxRepXSerializergetRepXSerializer (const char *typeName) const =0
 Returns RepX serializer given the corresponding type name. More...
 

Protected Member Functions

virtual ~PxSerializationRegistry ()
 

Detailed Description

Class serving as a registry for XML (RepX) and binary serializable types.

In order to serialize and deserialize objects the application needs to maintain an instance of this class. It can be created with PxSerialization::createSerializationRegistry() and released with PxSerializationRegistry::release().

See also
PxSerialization::createSerializationRegistry

Constructor & Destructor Documentation

◆ ~PxSerializationRegistry()

virtual PxSerializationRegistry::~PxSerializationRegistry ( )
inlineprotectedvirtual

Member Function Documentation

◆ getRepXSerializer()

virtual PxRepXSerializer* PxSerializationRegistry::getRepXSerializer ( const char *  typeName) const
pure virtual

Returns RepX serializer given the corresponding type name.

Parameters
typeNameName of the type
Returns
Registered PxRepXSerializer object corresponding to type name
See also
PxRepXSerializer, PxTypeInfo, PX_DEFINE_TYPEINFO

◆ getSerializer()

virtual const PxSerializer* PxSerializationRegistry::getSerializer ( PxType  type) const
pure virtual

Returns PxSerializer corresponding to type.

Parameters
typePxConcreteType of the serializer requested.
Returns
Registered PxSerializer object corresponding to type
See also
PxConcreteType

◆ registerBinaryMetaDataCallback()

virtual void PxSerializationRegistry::registerBinaryMetaDataCallback ( PxBinaryMetaDataCallback  callback)
pure virtual

Register binary meta data callback.

The callback is executed when calling PxSerialization::dumpBinaryMetaData.

Parameters
callbackPxBinaryMetaDataCallback to be registered.
See also
PxBinaryMetaDataCallback, PxSerialization::dumpBinaryMetaData

◆ registerRepXSerializer()

virtual void PxSerializationRegistry::registerRepXSerializer ( PxType  type,
PxRepXSerializer serializer 
)
pure virtual

Register a RepX serializer for a concrete type.

Parameters
typePxConcreteType corresponding to the RepX serializer
serializerThe PxRepXSerializer to be registered
See also
PxConcreteType, PxRepXSerializer

◆ registerSerializer()

virtual void PxSerializationRegistry::registerSerializer ( PxType  type,
PxSerializer serializer 
)
pure virtual

Register a serializer for a concrete type.

Parameters
typePxConcreteType corresponding to the serializer
serializerThe PxSerializer to be registered
See also
PxConcreteType, PxSerializer, PxSerializationRegistry::unregisterSerializer

◆ release()

virtual void PxSerializationRegistry::release ( )
pure virtual

Releases PxSerializationRegistry instance.

This unregisters all PhysX and PhysXExtension serializers. Make sure to unregister all custom type serializers before releasing the PxSerializationRegistry.

See also
PxSerializationRegistry::unregisterSerializer, PxSerializationRegistry::unregisterRepXSerializer

◆ unregisterRepXSerializer()

virtual PxRepXSerializer* PxSerializationRegistry::unregisterRepXSerializer ( PxType  type)
pure virtual

Unregister a RepX serializer for a concrete type, and retrieves the corresponding serializer object.

Parameters
typePxConcreteType for which the RepX serializer should be unregistered
Returns
Unregistered PxRepxSerializer corresponding to type, NULL for types for which no RepX serializer has been registered.
See also
PxConcreteType, PxSerializationRegistry::registerRepXSerializer, PxSerializationRegistry::release

◆ unregisterSerializer()

virtual PxSerializer* PxSerializationRegistry::unregisterSerializer ( PxType  type)
pure virtual

Unregister a serializer for a concrete type, and retrieves the corresponding serializer object.

Parameters
typePxConcreteType for which the serializer should be unregistered
Returns
Unregistered serializer corresponding to type, NULL for types for which no serializer has been registered.
See also
PxConcreteType, PxSerializationRegistry::registerSerializer, PxSerializationRegistry::release

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