OpenTTD Source: Window::WindowIterator< TtoBack > Struct Template Reference

OpenTTD Source 15.3

Public Types | Public Member Functions | Private Member Functions | Private Attributes
Window::WindowIterator< TtoBack > Struct Template Reference

Iterator to iterate all valid Windows. More...

`#include <window_gui.h>`

## Public Types
typedef Window * | value_type
typedef value_type * | pointer
typedef value_type & | reference
typedef size_t | difference_type
typedef std::forward_iterator_tag | iterator_category

## Public Member Functions
| WindowIterator (WindowList::iterator start)
| WindowIterator (const Window *w)
bool | operator== (const WindowIterator &other) const
Window * | operator* () const
WindowIterator & | operator++ ()
bool | IsEnd () const

## Private Member Functions
void | Validate ()
void | Next ()

## Private Attributes
WindowList::iterator | it

## Detailed Description

template<bool TtoBack>
struct Window::WindowIterator< TtoBack >

Iterator to iterate all valid Windows.

Template Parameters

  TtoBack | whether we iterate towards the back.

Definition at line 875 of file window_gui.h.

## Member Typedef Documentation

## ◆ difference_type

template<bool TtoBack>

typedef size_t Window::WindowIterator< TtoBack >::difference_type

Definition at line 879 of file window_gui.h.

## ◆ iterator_category

template<bool TtoBack>

typedef std::forward_iterator_tag Window::WindowIterator< TtoBack >::iterator_category

Definition at line 880 of file window_gui.h.

## ◆ pointer

template<bool TtoBack>

typedef value_type* Window::WindowIterator< TtoBack >::pointer

Definition at line 877 of file window_gui.h.

## ◆ reference

template<bool TtoBack>

typedef value_type& Window::WindowIterator< TtoBack >::reference

Definition at line 878 of file window_gui.h.

## ◆ value_type

template<bool TtoBack>

typedef Window* Window::WindowIterator< TtoBack >::value_type

Definition at line 876 of file window_gui.h.

## Constructor & Destructor Documentation

## ◆ WindowIterator() [1/2]

template<bool TtoBack>

Window::WindowIterator< TtoBack >::WindowIterator | ( | WindowList::iterator | start | ) |
| inlineexplicit

Definition at line 882 of file window_gui.h.

## ◆ WindowIterator() [2/2]

template<bool TtoBack>

Window::WindowIterator< TtoBack >::WindowIterator | ( | const Window * | w | ) |
| inlineexplicit

Definition at line 886 of file window_gui.h.

## Member Function Documentation

## ◆ IsEnd()

template<bool TtoBack>

bool Window::WindowIterator< TtoBack >::IsEnd | ( |  | ) | const
| inline

Definition at line 892 of file window_gui.h.

## ◆ Next()

template<bool TtoBack>

void Window::WindowIterator< TtoBack >::Next | ( |  | ) |
| inlineprivate

Definition at line 900 of file window_gui.h.

## ◆ operator*()

template<bool TtoBack>

Window * Window::WindowIterator< TtoBack >::operator* | ( |  | ) | const
| inline

Definition at line 889 of file window_gui.h.

## ◆ operator++()

template<bool TtoBack>

WindowIterator & Window::WindowIterator< TtoBack >::operator++ | ( |  | ) |
| inline

Definition at line 890 of file window_gui.h.

## ◆ operator==()

template<bool TtoBack>

bool Window::WindowIterator< TtoBack >::operator== | ( | const WindowIterator< TtoBack > & | other | ) | const
| inline

Definition at line 888 of file window_gui.h.

## ◆ Validate()

template<bool TtoBack>

void Window::WindowIterator< TtoBack >::Validate | ( |  | ) |
| inlineprivate

Definition at line 896 of file window_gui.h.

## Field Documentation

## ◆ it

template<bool TtoBack>

WindowList::iterator Window::WindowIterator< TtoBack >::it
| private

Definition at line 895 of file window_gui.h.

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

- src/window_gui.h