Helper class to handle conversion of linked-list style pools to plain vectors.
More...
#include <saveload_oldpool.h>
|
| struct | Item |
| | Container for each item with linked-list indexes. More...
|
|
| void | Clear () |
| | Clear all items from this old pool.
|
| Item * | Get (size_t ref_index) |
| | Get a pointer to an old item with the given reference index.
|
| Item & | Allocate (size_t pool_index) |
| | Allocate an old item with the given pool index.
|
| template<typename Taction> |
| void | TransformItems (size_t ref_index, Taction action) |
| | Traverse an old linked-list of items and perform an action on each one in turn.
|
| std::vector< T > | TransformToVector (size_t ref_index) |
| | Convert an old linked-list of items into a plain vector of items.
|
|
| std::vector< Item > | items {} |
| | Temporary storage for loading old pool items for later conversion.
|
template<typename
T>
class OldSaveLoadPool< T >
Helper class to handle conversion of linked-list style pools to plain vectors.
- Template Parameters
-
Definition at line 18 of file saveload_oldpool.h.
◆ Allocate()
Allocate an old item with the given pool index.
- Parameters
-
| pool_index | Pool index (zero-based) to allocate. |
- Returns
- Reference to allocated old item.
Definition at line 53 of file saveload_oldpool.h.
◆ Clear()
◆ Get()
◆ TransformItems()
template<typename Taction>
◆ TransformToVector()
Convert an old linked-list of items into a plain vector of items.
- Parameters
-
| ref_index | Reference index (one-based) to start from. |
- Returns
- Vector of items.
Definition at line 78 of file saveload_oldpool.h.
◆ items
Temporary storage for loading old pool items for later conversion.
Definition at line 85 of file saveload_oldpool.h.
The documentation for this class was generated from the following file: