Public Member Functions | Data Fields

BasePersistentStorageArray Struct Reference

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

#include <newgrf_storage.h>

Inheritance diagram for BasePersistentStorageArray:
PersistentStorageArray< TYPE, SIZE > PersistentStorageArray< int32, 16 > PersistentStorage

Public Member Functions

virtual ~BasePersistentStorageArray ()
 Remove references to use.
virtual void ClearChanges (bool keep_changes)=0
 Clear the changes made since the last ClearChanges.

Data Fields

uint32 grfid
 GRFID associated to this persistent storage. A value of zero means "default".
byte feature
 NOSAVE: Used to identify in the owner of the array in debug output.
TileIndex tile
 NOSAVE: Used to identify in the owner of the array in debug output.

Detailed Description

Base class for all persistent NewGRF storage arrays.

Nothing fancy, only here so we have a generalised access to the virtual methods.

Definition at line 22 of file newgrf_storage.h.


Member Function Documentation

virtual void BasePersistentStorageArray::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 >, and PersistentStorageArray< int32, 16 >.


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