Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

indri::file::DirectoryIterator Class Reference

#include <DirectoryIterator.hpp>

List of all members.

Public Member Functions

 DirectoryIterator ()
 DirectoryIterator (const std::string &path, bool relative=true)
 ~DirectoryIterator ()
void operator++ (int)
 Moves to the next file in the directory.

void operator++ ()
 Moves to the next file in the directory.

bool operator== (const DirectoryIterator &other)
const std::string & operator * ()
const std::string & base () const
void close ()
 Closes this iterator, releasing any operating system handles, etc.


Static Public Member Functions

const DirectoryIteratorend ()

Private Member Functions

void _copyCurrent ()
void _next ()

Private Attributes

bool _relative
std::string _current
void * _platform
std::string _path

Static Private Attributes

DirectoryIterator _end


Detailed Description

Provides iteration over directory entries.


Constructor & Destructor Documentation

indri::file::DirectoryIterator::DirectoryIterator  ) 
 

indri::file::DirectoryIterator::DirectoryIterator const std::string &  path,
bool  relative = true
 

Constructs a DirectoryIterator. The iterator will step through the files in the directory named in the path parameter. If the relative flag is set to true, the iteration returns file names only; otherwise full paths to files are returned.

indri::file::DirectoryIterator::~DirectoryIterator  ) 
 


Member Function Documentation

void indri::file::DirectoryIterator::_copyCurrent  )  [private]
 

void indri::file::DirectoryIterator::_next  )  [private]
 

const std::string & indri::file::DirectoryIterator::base  )  const
 

Returns the path of this directory (the path passed to the constructor of this object).

void indri::file::DirectoryIterator::close  ) 
 

Closes this iterator, releasing any operating system handles, etc.

const indri::file::DirectoryIterator & indri::file::DirectoryIterator::end  )  [static]
 

Placeholder object that indicates a finished iteration. Use this with operator != to tell when iteration is finished.

const std::string & indri::file::DirectoryIterator::operator *  ) 
 

Returns the full path to a file in the directory if relative was set to false in the constructor (which is the default). Otherwise, returns only the file name.

void indri::file::DirectoryIterator::operator++  ) 
 

Moves to the next file in the directory.

void indri::file::DirectoryIterator::operator++ int   ) 
 

Moves to the next file in the directory.

bool indri::file::DirectoryIterator::operator== const DirectoryIterator other  ) 
 

Used only for comparison with FileTreeIterator::end. If false, the iteration is complete.


Member Data Documentation

std::string indri::file::DirectoryIterator::_current [private]
 

indri::file::DirectoryIterator indri::file::DirectoryIterator::_end [static, private]
 

std::string indri::file::DirectoryIterator::_path [private]
 

void* indri::file::DirectoryIterator::_platform [private]
 

bool indri::file::DirectoryIterator::_relative [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:00 2010 for Lemur by doxygen 1.3.4