A feeder from an input directory name. More...
#include <FeedersRaster.h>
Public Member Functions | |
FeederConstRasterDirectory (const std::string &directoryName, const bool recursive, const std::string &rType, const bool sortFileNames, const std::vector< std::string > &fileExtensions) | |
Constructor from an input directory name. More... | |
te::rst::Raster const * | getCurrentObj () const |
Return the current sequence object. More... | |
unsigned int | getCurrentOffset () const |
Return the index of the current object. More... | |
unsigned int | getObjsCount () const |
Return the total number of feeder objects. More... | |
bool | moveNext () |
Advances to the next sequence obeject. More... | |
bool | moveTo (const unsigned int index) |
Jump to the given object index. More... | |
void | reset () |
Reset the feeder to the first position (subsequent accesses will start from the first sequence obejct). More... | |
~FeederConstRasterDirectory () | |
Protected Member Functions | |
FeederConstRasterDirectory () | |
Protected Attributes | |
std::vector< std::string > ::size_type | m_currentOffset |
std::auto_ptr< te::rst::Raster > | m_currentRasterPtr |
std::vector< std::string > | m_filesNames |
std::string | m_rType |
A feeder from an input directory name.
Definition at line 140 of file FeedersRaster.h.
te::rp::FeederConstRasterDirectory::FeederConstRasterDirectory | ( | const std::string & | directoryName, |
const bool | recursive, | ||
const std::string & | rType, | ||
const bool | sortFileNames, | ||
const std::vector< std::string > & | fileExtensions | ||
) |
Constructor from an input directory name.
directoryName | The directory full path name. |
recursive | true if a recursive search must be performed. |
rType | The name of the specific driver to instantiate each raster. |
sortFileNames | If true, the file names will be sorted. |
fileExtensions | The file extensions filter (example: ".tif"), or an empty vector if all extensions must be accepted. |
Definition at line 219 of file FeedersRaster.cpp.
References m_currentOffset, m_filesNames, and reset().
te::rp::FeederConstRasterDirectory::~FeederConstRasterDirectory | ( | ) |
Definition at line 309 of file FeedersRaster.cpp.
|
protected |
Definition at line 304 of file FeedersRaster.cpp.
|
virtual |
Return the current sequence object.
Implements te::rp::FeederConstRaster.
Definition at line 313 of file FeedersRaster.cpp.
References m_currentRasterPtr.
|
virtual |
Return the index of the current object.
Implements te::rp::FeederConstRaster.
Definition at line 410 of file FeedersRaster.cpp.
References m_currentOffset.
|
virtual |
Return the total number of feeder objects.
Implements te::rp::FeederConstRaster.
Definition at line 405 of file FeedersRaster.cpp.
References m_filesNames.
|
virtual |
Advances to the next sequence obeject.
Implements te::rp::FeederConstRaster.
Definition at line 318 of file FeedersRaster.cpp.
References m_currentOffset, m_currentRasterPtr, m_filesNames, m_rType, te::rst::RasterFactory::open(), and te::common::RAccess.
|
virtual |
Jump to the given object index.
Implements te::rp::FeederConstRaster.
Definition at line 354 of file FeedersRaster.cpp.
References m_currentOffset, m_currentRasterPtr, m_filesNames, m_rType, te::rst::RasterFactory::open(), and te::common::RAccess.
|
virtual |
Reset the feeder to the first position (subsequent accesses will start from the first sequence obejct).
Implements te::rp::FeederConstRaster.
Definition at line 382 of file FeedersRaster.cpp.
References m_currentOffset, m_currentRasterPtr, m_filesNames, m_rType, te::rst::RasterFactory::open(), and te::common::RAccess.
Referenced by FeederConstRasterDirectory().
|
protected |
Definition at line 171 of file FeedersRaster.h.
Referenced by FeederConstRasterDirectory(), getCurrentOffset(), moveNext(), moveTo(), and reset().
|
protected |
Definition at line 173 of file FeedersRaster.h.
Referenced by getCurrentObj(), moveNext(), moveTo(), and reset().
|
protected |
Definition at line 172 of file FeedersRaster.h.
Referenced by FeederConstRasterDirectory(), getObjsCount(), moveNext(), moveTo(), and reset().
|
protected |
Definition at line 170 of file FeedersRaster.h.
Referenced by moveNext(), moveTo(), and reset().