23.11
|
Memory region CPU implementation. More...
#include <MemoryRegion.h>
Public Member Functions | |
MemoryRegion (size_t size, size_t alignment=0) | |
Constructor. More... | |
MemoryRegion (void *ptr, size_t size) | |
MemoryRegion (const MemoryRegion &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
MemoryRegion (MemoryRegion &&)=default | |
Default move constructor. More... | |
MemoryRegion & | operator= (const MemoryRegion &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
MemoryRegion & | operator= (MemoryRegion &&)=default |
Default move assignment operator. More... | |
void * | buffer () final |
Returns the pointer to the allocated data. More... | |
const void * | buffer () const final |
Returns the pointer to the allocated data. More... | |
std::unique_ptr< IMemoryRegion > | extract_subregion (size_t offset, size_t size) final |
Extract a sub-region from the memory. More... | |
![]() | |
IMemoryRegion (size_t size) | |
Default constructor. More... | |
virtual | ~IMemoryRegion ()=default |
Virtual Destructor. More... | |
size_t | size () const |
Memory region size accessor. More... | |
void | set_size (size_t size) |
Sets size of region. More... | |
Memory region CPU implementation.
Definition at line 35 of file MemoryRegion.h.
|
inline |
Constructor.
[in] | size | Region size |
[in] | alignment | Alignment in bytes of the base pointer. Defaults to 0 |
Definition at line 43 of file MemoryRegion.h.
References IMemoryRegion::size().
|
inline |
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
inlinefinalvirtual |
Returns the pointer to the allocated data.
Implements IMemoryRegion.
Definition at line 82 of file MemoryRegion.h.
|
inlinefinalvirtual |
Returns the pointer to the allocated data.
Implements IMemoryRegion.
Definition at line 78 of file MemoryRegion.h.
|
inlinefinalvirtual |
Extract a sub-region from the memory.
[in] | offset | Offset to the region |
[in] | size | Size of the region |
Implements IMemoryRegion.
Definition at line 86 of file MemoryRegion.h.
References offset(), and IMemoryRegion::size().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.