tbx  0.7.3
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
tbx::Path::Iterator Class Reference

Iterator to step through files in a folder. More...

#include <path.h>

Classes

class  IterBlock
 Low level class to deal with the file iteration kernel calls. More...
 

Public Member Functions

 Iterator (const Iterator &other)
 Copy constructor. More...
 
Iteratoroperator= (const Iterator &other)
 Assign this iterator as the value of another. More...
 
bool operator== (const Iterator &other)
 Check if this iterator is the same as another. More...
 
bool operator!= (const Iterator &other)
 Check if this iterator is different from another. More...
 
Iteratoroperator++ ()
 Move iterator to next item. More...
 
Iterator operator++ (int)
 Move iterator to next item. More...
 
std::string & operator* ()
 Get file name for current iterator. More...
 
std::string * operator-> ()
 Get file name for current iterator. More...
 
void next ()
 Moves iterator on to the next item.
 

Public Attributes

std::string _name
 Variable for current file name.
 
class
tbx::Path::Iterator::IterBlock
_iterBlock
 

Protected Member Functions

 Iterator (const std::string &dirName, const char *wildCard)
 Construct a path iterator from a directory name and wild card. More...
 

Friends

class Path
 

Detailed Description

Iterator to step through files in a folder.

This is return by the tbx::Path::begin and tbx::Path::end methods.

Constructor & Destructor Documentation

Path::Iterator::Iterator ( const std::string &  dirName,
const char *  wildCard 
)
protected

Construct a path iterator from a directory name and wild card.

Parameters
dirNamename of directory to iterate
wildCardwild card to match against file names to return
Path::Iterator::Iterator ( const Iterator other)

Copy constructor.

Parameters
otherIterator to copy

Member Function Documentation

bool Path::Iterator::operator!= ( const Iterator other)

Check if this iterator is different from another.

Parameters
otherIterator to compare to
Returns
true if iterator are different
std::string& tbx::Path::Iterator::operator* ( )
inline

Get file name for current iterator.

Returns
file name
Path::Iterator & Path::Iterator::operator++ ( )

Move iterator to next item.

Returns
*this
Path::Iterator Path::Iterator::operator++ ( int  )

Move iterator to next item.

Returns
copy of iterator before the move
std::string* tbx::Path::Iterator::operator-> ( )
inline

Get file name for current iterator.

Returns
file name
Path::Iterator & Path::Iterator::operator= ( const Iterator other)

Assign this iterator as the value of another.

Parameters
otheriterator to copy
Returns
*this
bool Path::Iterator::operator== ( const Iterator other)

Check if this iterator is the same as another.

Parameters
otherIterator to compare to
Returns
true if iterator are the same

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