OpenTTD Source 20260206-master-g4d4e37dbf1
CargoSpec::Iterator Struct Reference

Iterator to iterate all valid CargoSpec. More...

#include <cargotype.h>

Public Types

typedef CargoSpec value_type
typedef CargoSpecpointer
typedef CargoSpecreference
typedef size_t difference_type
typedef std::forward_iterator_tag iterator_category

Public Member Functions

 Iterator (size_t index)
bool operator== (const Iterator &other) const
CargoSpecoperator* () const
Iterator & operator++ ()

Private Member Functions

void ValidateIndex ()

Private Attributes

size_t index

Detailed Description

Iterator to iterate all valid CargoSpec.

Definition at line 155 of file cargotype.h.

Member Typedef Documentation

◆ difference_type

typedef size_t CargoSpec::Iterator::difference_type

Definition at line 159 of file cargotype.h.

◆ iterator_category

typedef std::forward_iterator_tag CargoSpec::Iterator::iterator_category

Definition at line 160 of file cargotype.h.

◆ pointer

typedef CargoSpec* CargoSpec::Iterator::pointer

Definition at line 157 of file cargotype.h.

◆ reference

typedef CargoSpec& CargoSpec::Iterator::reference

Definition at line 158 of file cargotype.h.

◆ value_type

typedef CargoSpec CargoSpec::Iterator::value_type

Definition at line 156 of file cargotype.h.

Constructor & Destructor Documentation

◆ Iterator()

CargoSpec::Iterator::Iterator ( size_t index)
inlineexplicit

Definition at line 162 of file cargotype.h.

Member Function Documentation

◆ operator*()

CargoSpec * CargoSpec::Iterator::operator* ( ) const
inline

Definition at line 168 of file cargotype.h.

◆ operator++()

Iterator & CargoSpec::Iterator::operator++ ( )
inline

Definition at line 169 of file cargotype.h.

◆ operator==()

bool CargoSpec::Iterator::operator== ( const Iterator & other) const
inline

Definition at line 167 of file cargotype.h.

◆ ValidateIndex()

void CargoSpec::Iterator::ValidateIndex ( )
inlineprivate

Definition at line 173 of file cargotype.h.

Field Documentation

◆ index

size_t CargoSpec::Iterator::index
private

Definition at line 172 of file cargotype.h.


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