The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
gui2::iteration::iterator< order > Class Template Reference

The iterator class. More...

#include <iterator.hpp>

Inheritance diagram for gui2::iteration::iterator< order >:
Inheritance graph

Public Member Functions

 iterator (const iterator &)=delete
 
iteratoroperator= (const iterator &)=delete
 
 iterator (widget &root)
 Constructor. More...
 
bool at_end () const
 Has the iterator reached the end? More...
 
bool next ()
 Visit the next widget. More...
 
iterator< order > & operator++ ()
 See next. More...
 
widgetoperator* ()
 Returns the current widget. More...
 
widgetoperator-> ()
 See operator*. More...
 

Detailed Description

template<class order>
class gui2::iteration::iterator< order >

The iterator class.

See Iterator for more information.

Definition at line 38 of file iterator.hpp.

Constructor & Destructor Documentation

template<class order >
gui2::iteration::iterator< order >::iterator ( const iterator< order > &  )
delete
template<class order >
gui2::iteration::iterator< order >::iterator ( widget root)
inline

Constructor.

Parameters
rootThe widget where to start the iteration.

Definition at line 49 of file iterator.hpp.

Member Function Documentation

template<class order >
bool gui2::iteration::iterator< order >::at_end ( ) const
inline

Has the iterator reached the end?

Returns
The status.
Return values
[true]At the end.
[false]Not at the end.

Definition at line 60 of file iterator.hpp.

Referenced by test_control().

template<class order >
bool gui2::iteration::iterator< order >::next ( )
inline

Visit the next widget.

Precondition
The following assertion holds:
at_end() == false
Exceptions
Arange_error exception upon pre condition violation.
Returns
Whether the next widget can be safely deferred.

Definition at line 77 of file iterator.hpp.

References next.

template<class order >
widget& gui2::iteration::iterator< order >::operator* ( )
inline

Returns the current widget.

Returns
The current widget.

Definition at line 94 of file iterator.hpp.

Referenced by gui2::iteration::iterator< order >::operator->().

template<class order >
iterator<order>& gui2::iteration::iterator< order >::operator++ ( )
inline

See next.

Definition at line 83 of file iterator.hpp.

References next.

template<class order >
widget* gui2::iteration::iterator< order >::operator-> ( )
inline

See operator*.

Definition at line 100 of file iterator.hpp.

References gui2::iteration::iterator< order >::operator*().

template<class order >
iterator& gui2::iteration::iterator< order >::operator= ( const iterator< order > &  )
delete

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