OpenTTD Source: SmallStackItem< Titem, Tindex > Struct Template Reference

OpenTTD Source 15.0-beta1

Public Member Functions | Data Fields
SmallStackItem< Titem, Tindex > Struct Template Reference

Base class for SmallStack. More...

`#include <smallstack_type.hpp>`

Inheritance diagram for SmallStackItem< Titem, Tindex >:

## Public Member Functions
| SmallStackItem (const Titem &value, Tindex next)
| Create a new item.

## Data Fields
Tindex | next
| Pool index of next item.
Titem | value
| Value of current item.

## Detailed Description

template<typename Titem, typename Tindex>
struct SmallStackItem< Titem, Tindex >

Base class for SmallStack.

We cannot add this into SmallStack itself as certain compilers don't like it.

Definition at line 94 of file smallstack_type.hpp.

## Constructor & Destructor Documentation

## ◆ SmallStackItem()

template<typename Titem , typename Tindex >

SmallStackItem< Titem, Tindex >::SmallStackItem | ( | const Titem & | value,
|  | Tindex | next
| ) |  |
| inline

Create a new item.

Parameters

  value | Value of the item.
  next | Next item in the stack.

Definition at line 103 of file smallstack_type.hpp.

## Field Documentation

## ◆ next

template<typename Titem , typename Tindex >

Tindex SmallStackItem< Titem, Tindex >::next

Pool index of next item.

Definition at line 95 of file smallstack_type.hpp.

Referenced by SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Branch(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Contains(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::IsEmpty(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::operator=(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Pop(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Push(), and SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::~SmallStack().

## ◆ value

template<typename Titem , typename Tindex >

Titem SmallStackItem< Titem, Tindex >::value

Value of current item.

Definition at line 96 of file smallstack_type.hpp.

Referenced by SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Contains(), FindNearestHangar(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::IsEmpty(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::operator=(), SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Pop(), and SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Push().

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

- src/core/smallstack_type.hpp