#include <NvBlastExtSerialization.h>

Classes | |
| class | BufferProvider |
| struct | EncodingID |
Public Member Functions | |
| virtual void * | deserializeFromBuffer (const void *buffer, uint64_t bufferSize, uint32_t *objectTypeIDPtr=nullptr)=0 |
| virtual uint32_t | getSerializationEncoding () const =0 |
| virtual bool | peekHeader (uint32_t *objectTypeID, uint32_t *encodingID, uint64_t *dataSize, const void *buffer, uint64_t bufferSize)=0 |
| virtual void | release ()=0 |
| virtual uint64_t | serializeIntoBuffer (void *&buffer, const void *object, uint32_t objectTypeID)=0 |
| virtual void | setBufferProvider (BufferProvider *bufferProvider)=0 |
| virtual bool | setSerializationEncoding (uint32_t encodingID)=0 |
| virtual const void * | skipObject (uint64_t &bufferSize, const void *buffer)=0 |
Protected Member Functions | |
| virtual | ~ExtSerialization () |
| virtual Nv::Blast::ExtSerialization::~ExtSerialization | ( | ) | [inline, protected, virtual] |
Destructor is virtual and not public - use the release() method instead of explicitly deleting the serialization manager
| virtual void* Nv::Blast::ExtSerialization::deserializeFromBuffer | ( | const void * | buffer, | |
| uint64_t | bufferSize, | |||
| uint32_t * | objectTypeIDPtr = nullptr | |||
| ) | [pure virtual] |
Deserialize from a buffer into a newly allocated object.
| [in] | buffer | Pointer to the buffer to read. |
| [in] | bufferSize | Size of the buffer to read. |
| [out] | objectTypeIDPtr | Optional, if not NULL then *objectTypeIDPtr will be filled with the deserialized object's type ID if deserialization is successful, or 0 if unsuccessful. |
| virtual uint32_t Nv::Blast::ExtSerialization::getSerializationEncoding | ( | ) | const [pure virtual] |
Retrieve the current serialization encoding being used. Note, by default this is set to the encoding of the first serializer registered by a module. Currently this is done automatically by the NvBlastExtLlExtension module.
| virtual bool Nv::Blast::ExtSerialization::peekHeader | ( | uint32_t * | objectTypeID, | |
| uint32_t * | encodingID, | |||
| uint64_t * | dataSize, | |||
| const void * | buffer, | |||
| uint64_t | bufferSize | |||
| ) | [pure virtual] |
Reads information from a buffer, returning the contained object type ID, encoding ID, and data size.
| [out] | objectTypeID | If not NULL, the object type ID is written to *objectTypeID. |
| [out] | encodingID | If not NULL, the encoding ID is written to *encodingID. |
| [out] | dataSize | If not NULL, the data size is written to *dataSize. (Does not include the size of the header.) |
| [in] | buffer | Pointer to the buffer to read. |
| [in] | bufferSize | Size of the buffer to read. |
| virtual void Nv::Blast::ExtSerialization::release | ( | ) | [pure virtual] |
Release the serialization manager and all contained objects.
| virtual uint64_t Nv::Blast::ExtSerialization::serializeIntoBuffer | ( | void *& | buffer, | |
| const void * | object, | |||
| uint32_t | objectTypeID | |||
| ) | [pure virtual] |
Serialize into a buffer. Allocates the buffer internally using the callack set in setBufferProvider.
| [out] | buffer | Pointer to the buffer created. |
| [in] | object | Object pointer. |
| [in] | objectTypeID | Object type ID. |
| virtual void Nv::Blast::ExtSerialization::setBufferProvider | ( | BufferProvider * | bufferProvider | ) | [pure virtual] |
Set the buffer provider callback to use. (See BufferProvider.) If not set, a default provider using NVBLAST_ALLOC (see NvBlastGlobals.h) is used, which may be freed using NvBLAST_FREE.
| [in] | bufferProvider | Buffer provider callback to use. If NULL, uses the default provider using the allocator given in NvBlastGlobals. |
| virtual bool Nv::Blast::ExtSerialization::setSerializationEncoding | ( | uint32_t | encodingID | ) | [pure virtual] |
| virtual const void* Nv::Blast::ExtSerialization::skipObject | ( | uint64_t & | bufferSize, | |
| const void * | buffer | |||
| ) | [pure virtual] |
Determines the current object in the buffer and returns the position in the buffer immediately after the object.
| [in,out] | bufferSize | Size of the buffer to read on input, on output the remaining buffer size given the return buffer value. |
| [in] | buffer | Pointer to the buffer to read. |