26 #ifndef NVNEURAL_ZLIBRESOURCEAGGREGATOR_H 
   27 #define NVNEURAL_ZLIBRESOURCEAGGREGATOR_H 
   32 #include <unordered_map> 
   59     using ByteBuffer = std::string; 
 
   60     std::unordered_map<ByteBuffer, ResourceId> m_resources; 
 
   62     std::vector<std::pair<std::vector<uint8_t>, ResourceId>> m_finalizedResources; 
 
Definitions of C++ code generation interfaces exported by tools and plugins.
 
NeuralResult
NeuralResult is a generic success/failure result type similar to COM HRESULT.
Definition: CoreTypes.h:275
 
Standard implementation for IRefObject-derived objects.
 
IResourceDictionary::ResourceId ResourceId
Unique identifier for a resource.
Definition: CodeGenTypes.h:65
 
Resource aggregator that compresses payloads using Zlib.
Definition: ZlibResourceAggregator.h:41
 
const void * resourceBufferByIndex(std::size_t resourceIndex) const noexcept
Returns a pointer to the Nth finalized resource buffer in the object.
Definition: ZlibResourceAggregator.cpp:143
 
NeuralResult finalize() noexcept
Finalizes the resource collection, allowing for compression and serialization to take place.
Definition: ZlibResourceAggregator.cpp:81
 
NeuralResult addResource(IResourceAggregator::ResourceId *pResourceIdOut, const void *pBuffer, std::uint32_t bufferBytes) noexcept
Adds a resource to the dictionary, avoiding duplicates.
Definition: ZlibResourceAggregator.cpp:31
 
std::size_t resourceBufferSizeByIndex(std::size_t resourceIndex) const noexcept
Returns the byte count associated with the Nth finalized resource buffer in the object.
Definition: ZlibResourceAggregator.cpp:134
 
IResourceAggregator::ResourceId resourceIdByIndex(std::size_t resourceIndex) const noexcept
Returns the Nth resource ID in the object.
Definition: ZlibResourceAggregator.cpp:125
 
std::size_t resourceIdCount() const noexcept
Returns the number of finalized resources in the object.
Definition: ZlibResourceAggregator.cpp:120
 
Parameterized base class implementing common IRefObject operations.
Definition: RefObject.h:336