Mana
|
#include <Stack.h>
Public Member Functions | |
Stack () | |
Stack (const Stack &)=delete | |
Stack (Stack &&) noexcept=delete | |
Stack & | operator= (const Stack &)=delete |
Stack & | operator= (Stack &&) noexcept=delete |
~Stack ()=default | |
void | Serialize (const std::shared_ptr< OutputStream > &stream) const |
void | Deserialize (const std::shared_ptr< OutputStream > &stream) |
void | Clear () |
void | Duplicate () |
void | Remove (const address_t size) |
template<typename T > | |
void | Push (T value) |
void | Push (const void *buffer, const address_t size) |
template<typename T > | |
T | Pop () |
void | PopData (void *buffer, const address_t size) |
template<typename T > | |
T | Get (const address_t index) const |
void * | GetAddress (const address_t index) const |
template<typename T > | |
void | Set (const address_t index, T value) |
address_t | GetSize () const |
void | SetSize (const address_t size) |
bool | operator== (const Stack &other) const |
Stack memory for VM, allocating memory from the heap on each push; pop does not shrink the memory used.
|
inline |
|
delete |
|
deletenoexcept |
|
default |
|
inline |
Set the size used to 0. No memory is released.
|
inline |
|
inline |
Duplicate the pushed value; if Data was pushed, the first 8 bytes (4 bytes in 32-bit environment) will be duplicated.
|
inline |
Get the value of the specified position.
T | Specify the arithmetic or pointer type |
[in] | index | Position to get value |
|
inline |
Get the address of the specified location.
[in] | index | Position to get address |
|
inline |
Compare stacks.
[in] | other | Compare Stacks |
|
inline |
Pop value
T | Specify the arithmetic or pointer type |
|
inline |
Pop memory contents
[in] | buffer | Address to pop |
[in] | size | Size to pop |
|
inline |
Push memory contents
[in] | buffer | Address to push |
[in] | size | Size to push |
|
inline |
Push value
T | Specify the arithmetic or pointer type |
[in] | value | Value to push |
|
inline |
Shrink stack by specified size
[in] | size | size to shrink |
|
inline |
|
inline |
Sets a value at the specified position
T | Specify the arithmetic or pointer type |
[in] | index | Position to set address |
[in] | value | Value to set |
|
inline |
Set the stack size. Do not specify a size larger than you have allocated.
[in] | size | Stack Size |