libfossil
fsl::Deck::TCardIterator Class Reference

An iterator type for traversing lists of T-cards (tags) in a deck. More...

#include "fossil.hpp"

Inheritance diagram for fsl::Deck::TCardIterator:
fsl::FslListIterator< fsl_card_T const * >

Public Member Functions

 TCardIterator (Deck &d)
 Constructs a "begin" iterator for d's T-cards. More...
 
 TCardIterator ()
 Constructs an "end" iterator for a T-card list. More...
 
 ~TCardIterator () throw ()
 
fsl_card_T const * operator-> () const
 Returns the same as *this, but throws for an end iterator. More...
 
- Public Member Functions inherited from fsl::FslListIterator< fsl_card_T const * >
 FslListIterator (fsl_list const &list)
 Initializes this iterator to point to the first item im list (if list.used>0) or to be equivalent to the end iterator (if the list is empty). More...
 
 FslListIterator ()
 Initializes an end iterator. More...
 
bool operator!= (FslListIterator const &rhs) const throw ()
 
ValueType operator* ()
 Returns the current element's value (possibly NULL!). More...
 
FslListIteratoroperator++ ()
 Increments the iterator to point at the next list entry. More...
 
bool operator== (FslListIterator const &rhs) const throw ()
 

Additional Inherited Members

- Public Types inherited from fsl::FslListIterator< fsl_card_T const * >
typedef fsl_card_T const * value_type
 STL-compatible value_type typedef. More...
 
typedef fsl_card_T const * ValueType
 API-conventional ValueType. More...
 
- Protected Member Functions inherited from fsl::FslListIterator< fsl_card_T const * >
fsl_card_T const * currentValue () const throw ()
 

Detailed Description

An iterator type for traversing lists of T-cards (tags) in a deck.

Example usage:

Deck::TCardIterator it(myDeck);
Deck::TCardIterator end;
for( ; it != end; ++it ){
std::cout
<< fsl_tag_prefix_char(it->type)
<< it->name << '\n';
}

Definition at line 1803 of file fossil.hpp.

Constructor & Destructor Documentation

fsl::Deck::TCardIterator::TCardIterator ( Deck d)

Constructs a "begin" iterator for d's T-cards.

fsl::Deck::TCardIterator::TCardIterator ( )

Constructs an "end" iterator for a T-card list.

fsl::Deck::TCardIterator::~TCardIterator ( )
throw (
)

Member Function Documentation

fsl_card_T const* fsl::Deck::TCardIterator::operator-> ( ) const

Returns the same as *this, but throws for an end iterator.


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