PxSerializerDefaultAdapter
Defined in include/common/PxSerializer.h
-
template<class T>
class PxSerializerDefaultAdapter : public PxSerializer Default PxSerializer implementation.
Functionality needed for Binary Serialization only
-
inline virtual void exportExtraData(PxBase &obj, PxSerializationContext &s) const
Exports object’s extra data to stream.
-
inline virtual void exportData(PxBase &obj, PxSerializationContext &s) const
Exports object’s data to stream.
-
inline virtual void registerReferences(PxBase &obj, PxSerializationContext &s) const
Register references that the object maintains to other objects.
-
inline virtual size_t getClassSize() const
Returns size needed to create the class instance.
- Returns
sizeof class instance.
-
inline virtual PxBase *createObject(PxU8 *&address, PxDeserializationContext &context) const
Create object at a given address, resolve references and import extra data.
- Parameters
address – Location at which object is created. Address is increased by the size of the created object.
context – Context for reading external data and resolving references.
- Returns
Created PxBase pointer (needs to be identical to address before increment).
Basics needed for Binary- and RepX-Serialization
-
inline PxSerializerDefaultAdapter(const char *name)
-
inline virtual const char *getConcreteTypeName() const
Returns string name of dynamic type.
- Returns
Class name of most derived type of this object.
-
inline virtual void requiresObjects(PxBase &obj, PxProcessPxBaseCallback &c) const
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
-
inline virtual bool isSubordinate() const
Whether the object is subordinate.
A class is subordinate, if it can only be instantiated in the context of another class.
See also
PxSerialization::isSerializable
- Returns
Whether the class is subordinate
-
inline virtual void exportExtraData(PxBase &obj, PxSerializationContext &s) const