#include <newgrf_storage.h>
Public Member Functions | |
TemporaryStorageArray () | |
Simply construct the array. | |
void | Store (uint pos, uint32 value) |
Stores some value at a given position. | |
TYPE | Get (uint pos) const |
Gets the value from a given position. | |
void | ClearChanges (bool keep_changes) |
Clear the changes made since the last ClearChanges. | |
Data Fields | |
TYPE | storage [SIZE] |
Memory to for the storage array. |
On ClearChanges that data is always zero-ed.
TYPE | the type of variable to store. | |
SIZE | the size of the array. |
Definition at line 127 of file newgrf_storage.h.
void TemporaryStorageArray< TYPE, SIZE >::Store | ( | uint | pos, | |
uint32 | value | |||
) | [inline, virtual] |
Stores some value at a given position.
pos | the position to write at | |
value | the value to write |
Implements BaseStorageArray.
Definition at line 141 of file newgrf_storage.h.
References AddChangedStorage(), and TemporaryStorageArray< TYPE, SIZE >::storage.
TYPE TemporaryStorageArray< TYPE, SIZE >::Get | ( | uint | pos | ) | const [inline] |
Gets the value from a given position.
pos | the position to get the data from |
Definition at line 155 of file newgrf_storage.h.
References TemporaryStorageArray< TYPE, SIZE >::storage.
Referenced by GetRegister(), and PrepareTextRefStackUsage().
void TemporaryStorageArray< TYPE, SIZE >::ClearChanges | ( | bool | keep_changes | ) | [inline, virtual] |
Clear the changes made since the last ClearChanges.
This can be done in two ways:
keep_changes | do we save or revert the changes since the last ClearChanges? |
Implements BaseStorageArray.
Definition at line 163 of file newgrf_storage.h.
References TemporaryStorageArray< TYPE, SIZE >::storage.