CppCMS
Public Member Functions | Friends | List of all members
cppcms::form::iterator Class Reference

Input iterator used to iterate over all the widgets in a form. More...

#include <cppcms/form.h>

Inheritance diagram for cppcms::form::iterator:

Public Member Functions

 iterator ()
 
 iterator (form &)
 
 ~iterator ()
 
 iterator (iterator const &other)
 
iterator const & operator= (iterator const &other)
 
widgets::base_widgetoperator-> () const
 
widgets::base_widgetoperator* () const
 
bool operator== (iterator const &other) const
 
bool operator!= (iterator const &other) const
 
iterator operator++ (int)
 
iteratoroperator++ ()
 

Friends

class form
 

Detailed Description

Input iterator used to iterate over all the widgets in a form.

This class is mainly used by templates to render widgets. It recursively iterates over all the widgets and subforms.

Note
it iterates over widgets only and never form objects.
iterator p=f.begin();
if(p!=f.end())
if p!=f.end() --> *p is derived from widgets::base_widget.

Constructor & Destructor Documentation

cppcms::form::iterator::iterator ( )

End iterator.

cppcms::form::iterator::iterator ( form )

Create a widget iterator.

cppcms::form::iterator::~iterator ( )

Destructor.

cppcms::form::iterator::iterator ( iterator const &  other)

Copy the iterator. This operation is not cheap.

Member Function Documentation

bool cppcms::form::iterator::operator!= ( iterator const &  other) const
inline

Check if two iterators point to different elements.

widgets::base_widget& cppcms::form::iterator::operator* ( ) const
inline

Return the underlying widget. Condition: *this!=iterator().

iterator cppcms::form::iterator::operator++ ( int  )
inline

Post increment operator. It forwards the iterator to the next widget. Note it does not point to the higher level form container.

Note: it is preferable to use ++i rather than i++ as copying iterators is not cheap.

iterator& cppcms::form::iterator::operator++ ( )
inline

Increment operator. It forwards the iterator to the next widget. Note it does not point to the higher level form container.

widgets::base_widget* cppcms::form::iterator::operator-> ( ) const
inline

Return the underlying widget. Condition: *this!=iterator().

iterator const& cppcms::form::iterator::operator= ( iterator const &  other)

Assign the iterator. This operation is not cheap.

bool cppcms::form::iterator::operator== ( iterator const &  other) const
inline

Check if two iterators point to the same element.


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