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

The iterator class. More...

#include <iterator.hpp>

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

Public Member Functions

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

Detailed Description

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

The iterator class.

See Iterator for more information.

Definition at line 39 of file iterator.hpp.

Constructor & Destructor Documentation

template<class order >
gui2::iterator::titerator< order >::titerator ( twidget root)
inline

Constructor.

Parameters
rootThe widget where to start the iteration.

Definition at line 47 of file iterator.hpp.

Member Function Documentation

template<class order >
bool gui2::iterator::titerator< 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 58 of file iterator.hpp.

Referenced by test_control().

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

Visit the next widget.

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

Definition at line 75 of file iterator.hpp.

References next.

template<class order >
twidget& gui2::iterator::titerator< order >::operator* ( )
inline

Returns the current widget.

Returns
The current widget.

Definition at line 92 of file iterator.hpp.

References floating_point_emulation::operator*().

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

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

See next.

Definition at line 81 of file iterator.hpp.

References next.

template<class order >
twidget* gui2::iterator::titerator< order >::operator-> ( )
inline

See operator*.

Definition at line 98 of file iterator.hpp.

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


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