29#ifndef PX_REPX_SERIALIZER_H
30#define PX_REPX_SERIALIZER_H
35#include "common/PxBase.h"
36#include "extensions/PxRepXSimpleType.h"
43 class XmlMemoryAllocator;
110template<
typename TDataType>
128template<
typename TDataType>
137#define PX_NEW_REPX_SERIALIZER(T) \
138 *PX_PLACEMENT_NEW(PxGetAllocatorCallback()->allocate(sizeof(T), "PxRepXSerializer", __FILE__, __LINE__ ), T)(*PxGetAllocatorCallback())
143#define PX_DELETE_REPX_SERIALIZER(x) \
144 { PxRepXSerializer* s = x; if (s) { PxGetAllocatorCallback()->deallocate(s); } }
Definition SnXmlMemoryPoolStreams.h:165
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
virtual const char * getConcreteTypeName() const =0
Returns string name of dynamic type.
Collection class for serialization.
Definition PxCollection.h:104
Serializer interface for RepX (Xml) serialization.
Definition PxRepXSerializer.h:67
virtual const char * getTypeName()=0
The type this Serializer is meant to operate on.
virtual void objectToFile(const PxRepXObject &inLiveObject, PxCollection *inCollection, XmlWriter &inWriter, MemoryBuffer &inTempBuffer, PxRepXInstantiationArgs &inArgs)=0
Convert from a RepX object to a key-value pair hierarchy.
virtual PxRepXObject fileToObject(XmlReader &inReader, XmlMemoryAllocator &inAllocator, PxRepXInstantiationArgs &inArgs, PxCollection *inCollection)=0
Convert from a descriptor to a live object. Must be an object of this Serializer type.
Definition SnXmlSimpleXmlWriter.h:37
Definition SnXmlMemoryAllocator.h:37
Definition SnXmlReader.h:42
PX_INLINE physx::PxRepXObject PxCreateRepXObject(const TDataType *inType, const physx::PxSerialObjectId inId)
Inline helper template function to create PxRepXObject from TDataType type supporting PxTypeInfo<TDat...
Definition PxRepXSerializer.h:111
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxU64 PxSerialObjectId
ID type for PxBase objects in a PxCollection.
Definition PxSerialFramework.h:61
Arguments required to instantiate a serializable object from RepX.
Definition PxRepXSimpleType.h:83
Helper class containing the mapping of id to object, and type name.
Definition PxRepXSimpleType.h:50
a structure containing per-type information for types inheriting from PxBase
Definition PxTypeInfo.h:113