tbx  0.7.6
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

◆ Iterator() [1/2]

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

◆ Iterator() [2/2]

PathInfo::Iterator::Iterator ( const Iterator other)

Construct an the iterator as a copy of another.

Parameters
otherIterator to copy

Member Function Documentation

◆ operator!=()

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

◆ operator*()

PathInfo & PathInfo::Iterator::operator* ( )

Get the PathInfo for the iterator.

Returns
PathInfo for the iterators current position

◆ operator++() [1/2]

PathInfo::Iterator & PathInfo::Iterator::operator++ ( )

Move iterator to next item.

Returns
*this

◆ operator++() [2/2]

PathInfo::Iterator PathInfo::Iterator::operator++ ( int  )

Move iterator to next item.

Returns
copy of iterator before it was moved

◆ operator->()

PathInfo * PathInfo::Iterator::operator-> ( )

Get the PathInfo for the iterator.

Returns
PathInfo for the iterators current position

◆ operator=()

PathInfo::Iterator & PathInfo::Iterator::operator= ( const Iterator other)

Assign this iterator to another.

Parameters
otherIterator to copy
Returns
*this

◆ operator==()

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

◆ _info

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

Information on item iterator is pointing to


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