Key-value store for creating IResourceDictionary objects.
More...
#include <nvneural/CodeGenTypes.h>
|
virtual NeuralResult | addResource (ResourceId *pResourceIdOut, const void *pBuffer, std::uint32_t bufferBytes) noexcept=0 |
| Adds a resource to the dictionary, avoiding duplicates. More...
|
|
virtual NeuralResult | finalize () noexcept=0 |
| Finalizes the resource collection, allowing for compression and serialization to take place.
|
|
virtual const void * | resourceBufferByIndex (std::size_t resourceIndex) const noexcept=0 |
| Returns a pointer to the Nth finalized resource buffer in the object. More...
|
|
virtual std::size_t | resourceBufferSizeByIndex (std::size_t resourceIndex) const noexcept=0 |
| Returns the byte count associated with the Nth finalized resource buffer in the object. More...
|
|
virtual ResourceId | resourceIdByIndex (std::size_t resourceIndex) const noexcept=0 |
| Returns the Nth resource ID in the object. More...
|
|
virtual std::size_t | resourceIdCount () const noexcept=0 |
| Returns the number of finalized resources in the object.
|
|
virtual RefCount | addRef () const noexcept=0 |
| Increments the object's reference count. More...
|
|
virtual const void * | queryInterface (TypeId interface) const noexcept=0 |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
virtual void * | queryInterface (TypeId interface) noexcept=0 |
| Retrieves a new object interface pointer. More...
|
|
virtual RefCount | release () const noexcept=0 |
| Decrements the object's reference count and destroy the object if the reference count reaches zero. More...
|
|
|
static const TypeId | typeID = 0x14ecc3f9de638e1dul |
| Interface TypeId for InterfaceOf purposes.
|
|
virtual | ~IRefObject ()=default |
| A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr.
|
|
Key-value store for creating IResourceDictionary objects.
Each IResourceAggregator implementation is typically paired with a specific version of IResourceDictionary; generated code that loads from a dictionary typically does not need to know how the dictionary was compressed.
◆ ResourceId
Unique identifier for a resource.
Depending on the specific dictionary implementation, multiple IDs may point to the same binary data, but each ID will reference only one resource in the object.
◆ addResource()
virtual NeuralResult nvneural::IResourceAggregator::addResource |
( |
ResourceId * |
pResourceIdOut, |
|
|
const void * |
pBuffer, |
|
|
std::uint32_t |
bufferBytes |
|
) |
| |
|
pure virtualnoexcept |
Adds a resource to the dictionary, avoiding duplicates.
It is an error to add resources after finalize has been called.
- Parameters
-
pResourceIdOut | Variable receiving the stored resource ID |
pBuffer | Pointer to the resource |
bufferBytes | Size of the buffer in bytes |
◆ resourceBufferByIndex()
virtual const void* nvneural::IResourceAggregator::resourceBufferByIndex |
( |
std::size_t |
resourceIndex | ) |
const |
|
pure virtualnoexcept |
Returns a pointer to the Nth finalized resource buffer in the object.
- Parameters
-
◆ resourceBufferSizeByIndex()
virtual std::size_t nvneural::IResourceAggregator::resourceBufferSizeByIndex |
( |
std::size_t |
resourceIndex | ) |
const |
|
pure virtualnoexcept |
Returns the byte count associated with the Nth finalized resource buffer in the object.
- Parameters
-
◆ resourceIdByIndex()
virtual ResourceId nvneural::IResourceAggregator::resourceIdByIndex |
( |
std::size_t |
resourceIndex | ) |
const |
|
pure virtualnoexcept |
Returns the Nth resource ID in the object.
- Parameters
-
The documentation for this class was generated from the following file: