|
Cogs.Core
|
Public Member Functions | |
| uint8_t * | data () |
| Returns pointer to start of buffer data. Requires non-empty Contents. | |
| const uint8_t * | data () const |
| Returns pointer to start of buffer data. Requires non-empty Contents. | |
| size_t | size () const |
| bool | empty () const |
| std::string_view | toStringView () const |
| Return contents as a std::string_view. | |
| template<class T > | |
| std::span< const T > | toSpan (size_t offset=0) const |
Public Attributes | |
| std::shared_ptr< Memory::MemoryBuffer > | buffer |
| Actual resource contents. Prefer using access methods. | |
Definition at line 21 of file ResourceStore.h.
|
inline |
Returns pointer to start of buffer data. Requires non-empty Contents.
Definition at line 25 of file ResourceStore.h.
References buffer.
|
inline |
Returns pointer to start of buffer data. Requires non-empty Contents.
Definition at line 29 of file ResourceStore.h.
References buffer.
|
inline |
Definition at line 35 of file ResourceStore.h.
|
inline |
Definition at line 32 of file ResourceStore.h.
|
inline |
Return contents as a span of given type. Length is truncated if length of data not a multiple of span type. Example: resourceBuffer.to_span<int>();
| offset | - Optional BYTE offset into buffer. Client is responsible to ensure alignment. |
Definition at line 50 of file ResourceStore.h.
References buffer.
|
inline |
Return contents as a std::string_view.
Definition at line 39 of file ResourceStore.h.
References buffer.
| std::shared_ptr<Memory::MemoryBuffer> Cogs::Core::ResourceBuffer::buffer |
Actual resource contents. Prefer using access methods.
Definition at line 61 of file ResourceStore.h.
Referenced by data(), toSpan(), and toStringView().