OpenTTD Source 20241224-master-gee860a5c8e
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
 
bool operator!= (const Iterator &other) const
 
CargoSpecoperator* () const
 
Iteratoroperator++ ()
 

Private Member Functions

void ValidateIndex ()
 

Private Attributes

size_t index
 

Detailed Description

Iterator to iterate all valid CargoSpec.

Definition at line 157 of file cargotype.h.

Member Typedef Documentation

◆ difference_type

typedef size_t CargoSpec::Iterator::difference_type

Definition at line 161 of file cargotype.h.

◆ iterator_category

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

Definition at line 162 of file cargotype.h.

◆ pointer

Definition at line 159 of file cargotype.h.

◆ reference

Definition at line 160 of file cargotype.h.

◆ value_type

Definition at line 158 of file cargotype.h.

Constructor & Destructor Documentation

◆ Iterator()

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

Definition at line 164 of file cargotype.h.

Member Function Documentation

◆ operator!=()

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

Definition at line 170 of file cargotype.h.

◆ operator*()

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

Definition at line 171 of file cargotype.h.

◆ operator++()

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

Definition at line 172 of file cargotype.h.

◆ operator==()

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

Definition at line 169 of file cargotype.h.

◆ ValidateIndex()

void CargoSpec::Iterator::ValidateIndex ( )
inlineprivate

Definition at line 176 of file cargotype.h.

Field Documentation

◆ index

size_t CargoSpec::Iterator::index
private

Definition at line 175 of file cargotype.h.


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