te::rp::FeederConstRasterInfoAndVector Class Reference

#include <FeedersRaster.h>

Inheritance diagram for te::rp::FeederConstRasterInfoAndVector:
te::rp::FeederConstRaster te::rp::AbstractFeeder< const te::rst::Raster >

Public Member Functions

 FeederConstRasterInfoAndVector (const std::vector< const te::rst::Raster * > rastersPtrsVec, const std::vector< std::string > &rTypes, const std::vector< std::map< std::string, std::string > > &rInfos)
 Constructor from a vector of input rasters infos;. 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...
 
 ~FeederConstRasterInfoAndVector ()
 

Protected Member Functions

 FeederConstRasterInfoAndVector ()
 

Protected Attributes

std::unique_ptr< te::rst::Rasterm_currentRasterHandler
 
te::rst::Raster const * m_currentRasterNakedPtr
 
std::vector< const te::rst::Raster * >::size_type m_CurrentRasterOffset
 
std::vector< const te::rst::Raster * > m_rasters
 
std::vector< std::map< std::string, std::string > > m_rInfos
 
std::vector< std::string > m_rTypes
 

Detailed Description

Definition at line 140 of file FeedersRaster.h.

Constructor & Destructor Documentation

te::rp::FeederConstRasterInfoAndVector::FeederConstRasterInfoAndVector ( const std::vector< const te::rst::Raster * >  rastersPtrsVec,
const std::vector< std::string > &  rTypes,
const std::vector< std::map< std::string, std::string > > &  rInfos 
)

Constructor from a vector of input rasters infos;.

Parameters
rTypesThe name of the specific drivers to instantiate each raster.
rInfosThe necessary information to instantiate each raster.
rastersPtrsVecInput vector of rasters pointers.
Note
The given rasters must always be avaliable.

Definition at line 221 of file FeedersRaster.cpp.

References reset(), and TERP_TRUE_OR_THROW.

te::rp::FeederConstRasterInfoAndVector::~FeederConstRasterInfoAndVector ( )
default
te::rp::FeederConstRasterInfoAndVector::FeederConstRasterInfoAndVector ( )
protected

Definition at line 237 of file FeedersRaster.cpp.

References ~FeederConstRasterInfoAndVector().

Member Function Documentation

te::rst::Raster const * te::rp::FeederConstRasterInfoAndVector::getCurrentObj ( ) const
virtual

Return the current sequence object.

Returns
A pointer to the current object or a null pointer if there are no object to return.

Implements te::rp::FeederConstRaster.

Definition at line 246 of file FeedersRaster.cpp.

References m_currentRasterNakedPtr.

unsigned int te::rp::FeederConstRasterInfoAndVector::getCurrentOffset ( ) const
virtual

Return the index of the current object.

Returns
The index of the current object.

Implements te::rp::FeederConstRaster.

Definition at line 308 of file FeedersRaster.cpp.

References m_CurrentRasterOffset.

unsigned int te::rp::FeederConstRasterInfoAndVector::getObjsCount ( ) const
virtual

Return the total number of feeder objects.

Returns
The total number of feeder objects.

Implements te::rp::FeederConstRaster.

Definition at line 303 of file FeedersRaster.cpp.

References m_rasters, and m_rTypes.

bool te::rp::FeederConstRasterInfoAndVector::moveNext ( )
virtual

Advances to the next sequence obeject.

Returns
true if the advance was completed or false if the objects sequence end was reached.
Note
This method can invalidate any pointer returned by getCurrentObj.

Implements te::rp::FeederConstRaster.

Definition at line 251 of file FeedersRaster.cpp.

References m_CurrentRasterOffset, and moveTo().

bool te::rp::FeederConstRasterInfoAndVector::moveTo ( const unsigned int  index)
virtual

Jump to the given object index.

Returns
true if the jump was completed or false on errors.
Note
This method can invalidate any pointer returned by getCurrentObj.

Implements te::rp::FeederConstRaster.

Definition at line 256 of file FeedersRaster.cpp.

References m_currentRasterHandler, m_currentRasterNakedPtr, m_CurrentRasterOffset, m_rasters, m_rInfos, m_rTypes, te::rst::RasterFactory::open(), and te::common::RAccess.

Referenced by moveNext(), and reset().

void te::rp::FeederConstRasterInfoAndVector::reset ( )
virtual

Reset the feeder to the first position (subsequent accesses will start from the first sequence obejct).

Note
This method can invalidate any pointer returned by getCurrentObj.

Implements te::rp::FeederConstRaster.

Definition at line 294 of file FeedersRaster.cpp.

References m_currentRasterHandler, m_currentRasterNakedPtr, m_CurrentRasterOffset, and moveTo().

Referenced by FeederConstRasterInfoAndVector().

Member Data Documentation

std::unique_ptr< te::rst::Raster > te::rp::FeederConstRasterInfoAndVector::m_currentRasterHandler
protected

Definition at line 174 of file FeedersRaster.h.

Referenced by moveTo(), and reset().

te::rst::Raster const* te::rp::FeederConstRasterInfoAndVector::m_currentRasterNakedPtr
protected

Definition at line 169 of file FeedersRaster.h.

Referenced by getCurrentObj(), moveTo(), and reset().

std::vector< const te::rst::Raster* >::size_type te::rp::FeederConstRasterInfoAndVector::m_CurrentRasterOffset
protected

Definition at line 168 of file FeedersRaster.h.

Referenced by getCurrentOffset(), moveNext(), moveTo(), and reset().

std::vector< const te::rst::Raster* > te::rp::FeederConstRasterInfoAndVector::m_rasters
protected

Definition at line 171 of file FeedersRaster.h.

Referenced by getObjsCount(), and moveTo().

std::vector< std::map< std::string, std::string > > te::rp::FeederConstRasterInfoAndVector::m_rInfos
protected

Definition at line 173 of file FeedersRaster.h.

Referenced by moveTo().

std::vector< std::string > te::rp::FeederConstRasterInfoAndVector::m_rTypes
protected

Definition at line 172 of file FeedersRaster.h.

Referenced by getObjsCount(), and moveTo().


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