|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Provides access to a region within a memory pool buffer. More...
#include <aeongames/BufferAccessor.hpp>

Public Member Functions | |
| DLL | BufferAccessor () |
| Default constructor. | |
| DLL | BufferAccessor (MemoryPoolBuffer *aMemoryPoolBuffer, size_t aOffset, size_t aSize) |
| Construct an accessor for a specific region of a memory pool buffer. | |
| DLL | BufferAccessor (const BufferAccessor &) |
| Copy constructor. | |
| DLL | BufferAccessor (BufferAccessor &&) |
| Move constructor. | |
| DLL BufferAccessor & | operator= (const BufferAccessor &) |
| Copy assignment operator. | |
| DLL BufferAccessor & | operator= (BufferAccessor &&) |
| Move assignment operator. | |
| DLL void | WriteMemory (size_t aOffset, size_t aSize, const void *aData=nullptr) const |
| Write data into the buffer region. | |
| DLL void * | Map (size_t aOffset=0, size_t aSize=0) const |
| Map the buffer region into host-accessible memory. | |
| DLL void | Unmap () const |
| Unmap a previously mapped buffer region. | |
| DLL size_t | GetOffset () const |
| Get the byte offset of this accessor within the memory pool buffer. | |
| DLL size_t | GetSize () const |
| Get the size of the accessible region. | |
| DLL const MemoryPoolBuffer * | GetMemoryPoolBuffer () const |
| Get the underlying memory pool buffer. | |
Provides access to a region within a memory pool buffer.
Definition at line 24 of file BufferAccessor.hpp.
|
default |
Default constructor.
Creates an empty accessor.
| AeonGames::BufferAccessor::BufferAccessor | ( | MemoryPoolBuffer * | aMemoryPoolBuffer, |
| size_t | aOffset, | ||
| size_t | aSize ) |
Construct an accessor for a specific region of a memory pool buffer.
| aMemoryPoolBuffer | Pointer to the memory pool buffer. |
| aOffset | Byte offset into the buffer. |
| aSize | Size of the accessible region in bytes. |
Definition at line 23 of file BufferAccessor.cpp.
| const MemoryPoolBuffer * AeonGames::BufferAccessor::GetMemoryPoolBuffer | ( | ) | const |
Get the underlying memory pool buffer.
Definition at line 60 of file BufferAccessor.cpp.
| size_t AeonGames::BufferAccessor::GetOffset | ( | ) | const |
Get the byte offset of this accessor within the memory pool buffer.
Definition at line 52 of file BufferAccessor.cpp.
| size_t AeonGames::BufferAccessor::GetSize | ( | ) | const |
Get the size of the accessible region.
Definition at line 56 of file BufferAccessor.cpp.
| void * AeonGames::BufferAccessor::Map | ( | size_t | aOffset = 0, |
| size_t | aSize = 0 ) const |
Map the buffer region into host-accessible memory.
| aOffset | Byte offset relative to the accessor's region. |
| aSize | Size of the region to map (0 for entire region). |
Definition at line 40 of file BufferAccessor.cpp.
| void AeonGames::BufferAccessor::Unmap | ( | ) | const |
Unmap a previously mapped buffer region.
Definition at line 45 of file BufferAccessor.cpp.
| void AeonGames::BufferAccessor::WriteMemory | ( | size_t | aOffset, |
| size_t | aSize, | ||
| const void * | aData = nullptr ) const |
Write data into the buffer region.
| aOffset | Byte offset relative to the accessor's region. |
| aSize | Size of the data to write in bytes. |
| aData | Pointer to the source data, or nullptr to zero-fill. |
Definition at line 33 of file BufferAccessor.cpp.