|
HDK
|
#include <inMemoryAsset.h>
Inheritance diagram for ArInMemoryAsset:Public Member Functions | |
| AR_API | ~ArInMemoryAsset () |
| AR_API size_t | GetSize () const override |
| Returns the size of the buffer managed by this object. More... | |
| AR_API std::shared_ptr< const char > | GetBuffer () const override |
| Returns the buffer managed by this object. More... | |
| AR_API size_t | Read (void *buffer, size_t count, size_t offset) const override |
| AR_API std::pair< FILE *, size_t > | GetFileUnsafe () const override |
| Returns { nullptr, 0 } as this object is not associated with a file. More... | |
| AR_API std::shared_ptr< ArAsset > | GetDetachedAsset () const override |
| template<class BufferSharedPtr > | |
| ArInMemoryAsset (BufferSharedPtr &&buffer, size_t bufferSize, PrivateCtorTag) | |
Public Member Functions inherited from ArAsset | |
| virtual AR_API | ~ArAsset () |
| ArAsset (const ArAsset &)=delete | |
| ArAsset & | operator= (const ArAsset &)=delete |
Static Public Member Functions | |
| static AR_API std::shared_ptr < ArInMemoryAsset > | FromAsset (const ArAsset &srcAsset) |
| static AR_API std::shared_ptr < ArInMemoryAsset > | FromBuffer (const std::shared_ptr< const char > &buffer, size_t bufferSize) |
| static AR_API std::shared_ptr < ArInMemoryAsset > | FromBuffer (std::shared_ptr< const char > &&buffer, size_t bufferSize) |
Additional Inherited Members | |
Protected Member Functions inherited from ArAsset | |
| AR_API | ArAsset () |
ArAsset implementation that stores asset content in a heap-allocated buffer managed by this object.
Definition at line 23 of file inMemoryAsset.h.
| AR_API ArInMemoryAsset::~ArInMemoryAsset | ( | ) |
Destructor. Note that this may not destroy the associated buffer if a client is holding on to the result of GetBuffer().
| ArInMemoryAsset::ArInMemoryAsset | ( | BufferSharedPtr && | buffer, |
| size_t | bufferSize, | ||
| PrivateCtorTag | |||
| ) |
|
static |
Constructs a new instance containing the entire contents of srcAsset.
Returns nullptr if a buffer large enough to hold srcAsset's contents cannot be allocated or if an error occurs when reading srcAsset's contents into the buffer.
|
static |
Constructs a new instance sharing ownership of the given buffer containing bufferSize bytes.
|
static |
Constructs a new instance taking ownership of the given buffer containing bufferSize bytes.
|
overridevirtual |
Returns the buffer managed by this object.
Implements ArAsset.
Returns a new ArInMemoryAsset instance that shares the same buffer as this object.
Reimplemented from ArAsset.
|
overridevirtual |
Returns { nullptr, 0 } as this object is not associated with a file.
Implements ArAsset.
|
overridevirtual |
Returns the size of the buffer managed by this object.
Implements ArAsset.
|
overridevirtual |
Reads count bytes from the buffer held by this object at the given offset into buffer.
Implements ArAsset.