OpenTTD Source 20261123-master-g1c55c72fd0
CargoSpec::IterateWrapper Struct Reference

Iterable ensemble of all valid CargoSpec. More...

#include <cargotype.h>

Public Member Functions

 IterateWrapper (size_t from=0)
 Constructs new iterator wrapper from an stating index.
Iterator begin ()
 Get the begin iterator for this range of valid CargoSpec.
Iterator end ()
 Get the end iterator for all valid CargoSpec.
bool empty ()
 Check whether this range of valid CargoSpec is empty.

Data Fields

size_t from
 Index from which the iteration started.

Detailed Description

Iterable ensemble of all valid CargoSpec.

Definition at line 206 of file cargotype.h.

Constructor & Destructor Documentation

◆ IterateWrapper()

CargoSpec::IterateWrapper::IterateWrapper ( size_t from = 0)
inline

Constructs new iterator wrapper from an stating index.

Parameters
fromIndex of the first CargoSpec to consider.

Definition at line 213 of file cargotype.h.

References from.

Member Function Documentation

◆ begin()

Iterator CargoSpec::IterateWrapper::begin ( )
inline

Get the begin iterator for this range of valid CargoSpec.

Returns
Begin iterator.

Definition at line 219 of file cargotype.h.

Referenced by empty().

◆ empty()

bool CargoSpec::IterateWrapper::empty ( )
inline

Check whether this range of valid CargoSpec is empty.

Returns
true iff the range is empty.

Definition at line 231 of file cargotype.h.

References begin(), and end().

◆ end()

Iterator CargoSpec::IterateWrapper::end ( )
inline

Get the end iterator for all valid CargoSpec.

Returns
End iterator.

Definition at line 225 of file cargotype.h.

References CargoSpec::GetArraySize().

Referenced by empty().

Field Documentation

◆ from

size_t CargoSpec::IterateWrapper::from

Index from which the iteration started.

Definition at line 207 of file cargotype.h.

Referenced by IterateWrapper().


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