Public Member Functions

# BaseStorageArray Struct Reference

Base class for all NewGRF storage arrays. More...

`#include <newgrf_storage.h>`

Inheritance diagram for BaseStorageArray:

## Public Member Functions
virtual | ~BaseStorageArray ()
| Remove references to use.
virtual void | ClearChanges (bool keep_changes)=0
| Clear the changes made since the last ClearChanges.
virtual void | StoreValue (uint pos, int32 value)=0
| Stores some value at a given position.

## Detailed Description

Base class for all NewGRF storage arrays.

Nothing fancy, only here so we have a generalised class to use.

Definition at line 21 of file newgrf_storage.h.

## Member Function Documentation

virtual void BaseStorageArray::ClearChanges | ( | bool | keep_changes | ) | `[pure virtual]`

Clear the changes made since the last ClearChanges.

This can be done in two ways:

- saving the changes permanently
- reverting to the previous version
  Parameters:

    | keep_changes | do we save or revert the changes since the last ClearChanges?

Implemented in PersistentStorageArray< TYPE, SIZE >, TemporaryStorageArray< TYPE, SIZE >, and PersistentStorageArray< int32, 16 >.

virtual void BaseStorageArray::StoreValue | ( | uint | pos,
|  | int32 | value |
| ) |  |  | `[pure virtual]`

Stores some value at a given position.

Parameters:

  | pos | the position to write at
  | value | the value to write

Implemented in PersistentStorageArray< TYPE, SIZE >, TemporaryStorageArray< TYPE, SIZE >, and PersistentStorageArray< int32, 16 >.

The documentation for this struct was generated from the following files:

- src/newgrf_storage.h
- src/newgrf_storage.cpp