RavEngine
Loading...
Searching...
No Matches
physx::RepXSerializerImpl< TLiveType > Struct Template Referenceabstract

#include <SnRepXSerializerImpl.h>

Inheritance diagram for physx::RepXSerializerImpl< TLiveType >:
[legend]
Collaboration diagram for physx::RepXSerializerImpl< TLiveType >:
[legend]

Public Member Functions

 RepXSerializerImpl (PxAllocatorCallback &inAllocator)
 
virtual const char * getTypeName ()
 The type this Serializer is meant to operate on.
 
virtual void objectToFile (const PxRepXObject &inLiveObject, PxCollection *inCollection, XmlWriter &inWriter, MemoryBuffer &inTempBuffer, PxRepXInstantiationArgs &inArgs)
 Convert from a RepX object to a key-value pair hierarchy.
 
virtual PxRepXObject fileToObject (XmlReader &inReader, XmlMemoryAllocator &inAllocator, PxRepXInstantiationArgs &inArgs, PxCollection *inCollection)
 Convert from a descriptor to a live object. Must be an object of this Serializer type.
 
virtual void objectToFileImpl (const TLiveType *inObj, PxCollection *inCollection, XmlWriter &inWriter, MemoryBuffer &inTempBuffer, PxRepXInstantiationArgs &)
 
virtual bool fileToObjectImpl (TLiveType *inObj, XmlReader &inReader, XmlMemoryAllocator &inAllocator, PxRepXInstantiationArgs &inArgs, PxCollection *inCollection)
 
virtual TLiveType * allocateObject (PxRepXInstantiationArgs &inArgs)=0
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Public Attributes

PxAllocatorCallback & mAllocator
 

Protected Member Functions

 RepXSerializerImpl (const RepXSerializerImpl &inOther)
 
RepXSerializerImpl & operator= (const RepXSerializerImpl &inOther)
 

Detailed Description

template<typename TLiveType>
struct physx::RepXSerializerImpl< TLiveType >

The repx serializer impl takes the raw, untyped repx extension interface and implements the simpler functions plus does the reinterpret-casts required for any object to implement the serializer safely.

Member Function Documentation

◆ fileToObject()

template<typename TLiveType >
virtual PxRepXObject physx::RepXSerializerImpl< TLiveType >::fileToObject ( XmlReader &  inReader,
XmlMemoryAllocator &  inAllocator,
PxRepXInstantiationArgs &  inArgs,
PxCollection *  inCollection 
)
inlinevirtual

Convert from a descriptor to a live object. Must be an object of this Serializer type.

Parameters
[in]inReaderThe inverse of the writer, a key-value pair database.
[in]inAllocatorAn allocator to use for temporary allocations. These will be freed after instantiation completes.
[in]inArgsThe arguments used in create resources and objects.
[in]inCollectionThe collection used to find references.
Returns
The new live object. It can be an invalid object if the instantiation cannot take place.

Implements physx::PxRepXSerializer.

Reimplemented in physx::PxShapeRepXSerializer, physx::PxBVH33TriangleMeshRepXSerializer, physx::PxBVH34TriangleMeshRepXSerializer, physx::PxHeightFieldRepXSerializer, physx::PxConvexMeshRepXSerializer, physx::PxAggregateRepXSerializer, physx::PxJointRepXSerializer< TJointType >, and physx::PxVehicleRepXSerializer< TVehicleType >.

◆ getTypeName()

template<typename TLiveType >
virtual const char * physx::RepXSerializerImpl< TLiveType >::getTypeName ( )
inlinevirtual

The type this Serializer is meant to operate on.

See also
PxRepXObject::typeName

Implements physx::PxRepXSerializer.

◆ objectToFile()

template<typename TLiveType >
virtual void physx::RepXSerializerImpl< TLiveType >::objectToFile ( const PxRepXObject &  inLiveObject,
PxCollection *  inCollection,
XmlWriter &  inWriter,
MemoryBuffer &  inTempBuffer,
PxRepXInstantiationArgs &  inArgs 
)
inlinevirtual

Convert from a RepX object to a key-value pair hierarchy.

Parameters
[in]inLiveObjectThe object to convert to the passed in descriptor.
[in]inCollectionThe collection to use to find ids of references of this object.
[in]inWriterInterface to write data to.
[in]inTempBufferused to for temporary allocations.
[in]inArgsThe arguments used in create resources and objects.

Implements physx::PxRepXSerializer.


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