PxSerializationRegistry

Defined in include/common/PxSerialFramework.h

class PxSerializationRegistry

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

Binary Serialization Functionality

virtual void registerSerializer(PxType type, PxSerializer &serializer) = 0

Register a serializer for a concrete type.

See also

PxConcreteType, PxSerializer, PxSerializationRegistry::unregisterSerializer

Parameters
  • type – PxConcreteType corresponding to the serializer

  • serializer – The PxSerializer to be registered

virtual PxSerializer *unregisterSerializer(PxType type) = 0

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

See also

PxConcreteType, PxSerializationRegistry::registerSerializer, PxSerializationRegistry::release

Parameters

type – PxConcreteType for which the serializer should be unregistered

Returns

Unregistered serializer corresponding to type, NULL for types for which no serializer has been registered.

virtual void registerBinaryMetaDataCallback(PxBinaryMetaDataCallback callback) = 0

Register binary meta data callback.

Deprecated:

Binary conversion and binary meta data are deprecated.

The callback is executed when calling PxSerialization::dumpBinaryMetaData.

See also

PxBinaryMetaDataCallback, PxSerialization::dumpBinaryMetaData

Parameters

callback – PxBinaryMetaDataCallback to be registered.

virtual const PxSerializer *getSerializer(PxType type) const = 0

Returns PxSerializer corresponding to type.

See also

PxConcreteType

Parameters

type – PxConcreteType of the serializer requested.

Returns

Registered PxSerializer object corresponding to type

RepX (XML) Serialization Functionality

virtual void registerRepXSerializer(PxType type, PxRepXSerializer &serializer) = 0

Register a RepX serializer for a concrete type.

Deprecated:

Xml serialization is deprecated. An alternative serialization system is provided through USD Physics.

See also

PxConcreteType, PxRepXSerializer

Parameters
  • type – PxConcreteType corresponding to the RepX serializer

  • serializer – The PxRepXSerializer to be registered

virtual PxRepXSerializer *unregisterRepXSerializer(PxType type) = 0

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

Deprecated:

Xml serialization is deprecated. An alternative serialization system is provided through USD Physics.

See also

PxConcreteType, PxSerializationRegistry::registerRepXSerializer, PxSerializationRegistry::release

Parameters

type – PxConcreteType 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.

virtual PxRepXSerializer *getRepXSerializer(const char *typeName) const = 0

Returns RepX serializer given the corresponding type name.

Deprecated:

Xml serialization is deprecated. An alternative serialization system is provided through USD Physics.

See also

PxRepXSerializer, PxTypeInfo, PX_DEFINE_TYPEINFO

Parameters

typeName – Name of the type

Returns

Registered PxRepXSerializer object corresponding to type name

virtual void release() = 0

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

inline virtual ~PxSerializationRegistry()