7#ifndef PXR_USD_AR_ASSET_H
8#define PXR_USD_AR_ASSET_H
13#include "pxr/usd/ar/ar.h"
14#include "pxr/usd/ar/api.h"
20PXR_NAMESPACE_OPEN_SCOPE
48 virtual std::shared_ptr<const char>
GetBuffer()
const = 0;
56 virtual size_t Read(
void* buffer,
size_t count,
size_t offset)
const = 0;
93PXR_NAMESPACE_CLOSE_SCOPE
Interface for accessing the contents of an asset.
virtual AR_API std::pair< FILE *, size_t > GetFileUnsafe() const =0
Returns a read-only FILE* handle and offset for this asset if available, or (nullptr,...
virtual AR_API size_t GetSize() const =0
Returns size of the asset.
virtual AR_API std::shared_ptr< ArAsset > GetDetachedAsset() const
Returns an ArAsset with the contents of this asset detached from from this asset's serialized data.
virtual AR_API size_t Read(void *buffer, size_t count, size_t offset) const =0
Read count bytes at offset from the beginning of the asset into buffer.
virtual AR_API std::shared_ptr< const char > GetBuffer() const =0
Returns a pointer to a buffer with the contents of the asset, with size given by GetSize().