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

Iterator used to iterate through a directory. 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)
 Construct an the iterator as a copy of another. More...
 
Iteratoroperator= (const Iterator &other)
 Assign this iterator to 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 and another are different. More...
 
Iteratoroperator++ ()
 Move iterator to next item. More...
 
Iterator operator++ (int)
 Move iterator to next item. More...
 
PathInfooperator* ()
 Get the PathInfo for the iterator. More...
 
PathInfooperator-> ()
 Get the PathInfo for the iterator. More...
 
void next ()
 Move iterator to next item.
 

Protected Member Functions

 Iterator (const std::string &dirName, const char *wildCard)
 Construct new iterator to iterate through a directory. More...
 

Protected Attributes

PathInfo_info
 
class
tbx::PathInfo::Iterator::IterBlock
_iterBlock
 

Friends

class PathInfo
 

Detailed Description

Iterator used to iterate through a directory.

use the tbx::PathInfo::begin and tbx::PathInfo::end methods to return this iterator

Constructor & Destructor Documentation

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

Construct new iterator to iterate through a directory.

Call the PathInfo::begin method to get this

Parameters
dirNamedirectory name to iterate
wildCardwild card to select certain paths
PathInfo::Iterator::Iterator ( const Iterator other)

Construct an the iterator as a copy of another.

Parameters
otherIterator to copy

Member Function Documentation

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

Check if this iterator and another are different.

Parameters
otheriterator to compare to
Returns
true if iterators are not the same
PathInfo & PathInfo::Iterator::operator* ( )

Get the PathInfo for the iterator.

Returns
PathInfo for the iterators current position
PathInfo::Iterator & PathInfo::Iterator::operator++ ( )

Move iterator to next item.

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

Move iterator to next item.

Returns
copy of iterator before it was moved
PathInfo * PathInfo::Iterator::operator-> ( )

Get the PathInfo for the iterator.

Returns
PathInfo for the iterators current position
PathInfo::Iterator & PathInfo::Iterator::operator= ( const Iterator other)

Assign this iterator to another.

Parameters
otherIterator to copy
Returns
*this
bool PathInfo::Iterator::operator== ( const Iterator other)

Check if this iterator is the same as another.

Parameters
otheriterator to compare to
Returns
true if iterators are the same

Member Data Documentation

PathInfo* tbx::PathInfo::Iterator::_info
protected

Information on item iterator is pointing to


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