Fawkes API  Fawkes Development Version
fawkes::Exception::iterator Class Reference

Message iterator for exceptions. More...

#include <>>

Public Member Functions

 iterator (const iterator &i)
 Copy constructor. More...
 
 iterator ()
 Plain constructor. More...
 
iteratoroperator++ ()
 Prefix ++ operator. More...
 
iterator operator++ (int inc)
 Postfix ++ operator. More...
 
bool operator== (const iterator &i) const
 Check equality. More...
 
bool operator!= (const iterator &i) const
 Check inequality. More...
 
const char * operator* () const
 Get current message. More...
 
iteratoroperator= (const iterator &i)
 Assignment operator. More...
 

Friends

class Exception
 

Detailed Description

Message iterator for exceptions.

This iterator allows for iterating over all messages carried by an Exception.

Author
Tim Niemueller

Definition at line 72 of file exception.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

fawkes::Exception::iterator::iterator ( const iterator i)

Copy constructor.

Parameters
iiterator to copy

Definition at line 746 of file exception.cpp.

◆ iterator() [2/2]

fawkes::Exception::iterator::iterator ( )

Plain constructor.

Creates a new invalid iterator (same as Exception::end()).

Definition at line 737 of file exception.cpp.

Referenced by fawkes::Exception::end().

Member Function Documentation

◆ operator!=()

bool fawkes::Exception::iterator::operator!= ( const iterator i) const

Check inequality.

Parameters
iiterator to compare to
Returns
true, if iterators point to different messages, false otherwise

Definition at line 796 of file exception.cpp.

◆ operator*()

const char * fawkes::Exception::iterator::operator* ( ) const

Get current message.

Get message at current position. Returns NULL for the invalid ieterator.

Returns
message or NULL if iterator is invalid

Definition at line 807 of file exception.cpp.

◆ operator++() [1/2]

Exception::iterator & fawkes::Exception::iterator::operator++ ( )

Prefix ++ operator.

Returns
reference to this iterator after advancing.

Definition at line 756 of file exception.cpp.

◆ operator++() [2/2]

Exception::iterator fawkes::Exception::iterator::operator++ ( int  inc)

Postfix ++ operator.

Parameters
incused to denote postfix operator
Returns
copy of iterator before advancing.

Definition at line 770 of file exception.cpp.

◆ operator=()

Exception::iterator & fawkes::Exception::iterator::operator= ( const iterator i)

Assignment operator.

Parameters
iiterator to assign to this iterator.
Returns
reference to this iterator.

Definition at line 822 of file exception.cpp.

◆ operator==()

bool fawkes::Exception::iterator::operator== ( const iterator i) const

Check equality.

Parameters
iiterator to compare to
Returns
true, if iterators point to the same message, false otherwise

Definition at line 785 of file exception.cpp.


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