This class give a representation to a chunk or memory. More...
This class give a representation to a chunk or memory.
This class give a representation to a chunk of memory as an array of T objects
| T | This is the object type |
Definition at line 25 of file memory_array.hpp.
#include <memory_array.hpp>
Public Member Functions | |
| void | set_pointer (void *ptr_) |
| Set the internal pointer to the indicated chunk of memory. | |
| void * | get_pointer () |
| Return the pointer. | |
| T & | operator[] (mem_id i) |
| operator[] | |
| memory_array () | |
| Default constructor. | |
| memory_array (void *ptr, size_t sz, bool init) | |
| Memory array constructor. More... | |
| ~memory_array () | |
| Destructor. More... | |
Private Member Functions | |
| T | get (mem_id i) |
| return the i element | |
Private Attributes | |
| T * | ptr |
| size_t | sz |
|
inline |
Memory array constructor.
| ptr | Memory pointer |
| sz | size |
| init | specify if the pointer is initialized |
Definition at line 78 of file memory_array.hpp.
|
inline |
Destructor.
Definition at line 98 of file memory_array.hpp.