24 #ifndef INCLUDE_AR_ASSET
25 #error This file should not be included directly. Include asset.h instead.
28 #ifndef PXR_USD_AR_ASSET_V1_H
29 #define PXR_USD_AR_ASSET_V1_H
34 #include "pxr/usd/ar/api.h"
40 PXR_NAMESPACE_OPEN_SCOPE
69 virtual std::shared_ptr<const char>
GetBuffer() = 0;
77 virtual size_t Read(
void* buffer,
size_t count,
size_t offset) = 0;
104 PXR_NAMESPACE_CLOSE_SCOPE
106 #endif // PXR_USD_AR_ASSET_V1_H
Interface for accessing the contents of an asset.
virtual AR_API std::shared_ptr< const char > GetBuffer()=0
Returns a pointer to a buffer with the contents of the asset, with size given by GetSize().
virtual AR_API size_t Read(void *buffer, size_t count, size_t offset)=0
Read count bytes at offset from the beginning of the asset into buffer.
virtual AR_API size_t GetSize()=0
Returns size of the asset.
virtual AR_API std::pair< FILE *, size_t > GetFileUnsafe()=0
Returns a read-only FILE* handle and offset for this asset if available, or (nullptr, 0) otherwise.