Helios++
Helios software for LiDAR simulations
helios::filems::FileReader< ReadType > Class Template Referenceabstract

Abstract class defining the fundamentals of any file reader. More...

#include <FileReader.h>

Inheritance diagram for helios::filems::FileReader< ReadType >:
Collaboration diagram for helios::filems::FileReader< ReadType >:

Public Member Functions

 FileReader (string const &path)
 Default constructor for file reader. More...
 
virtual ReadType read ()=0
 Read from file. More...
 
virtual string getPath () const
 Obtain the path to the file to be read. More...
 
virtual void setPath (string const &path)
 Set the path to the file to be read. More...
 

Protected Member Functions

virtual void makeStrategy ()=0
 Build the strategy for the file reader.
 

Protected Attributes

string path
 Path to the file to be read.
 
shared_ptr< ReadingStrategy< ReadType > > readingStrategy = nullptr
 The reading strategy to be used by the file reader. More...
 

Detailed Description

template<typename ReadType>
class helios::filems::FileReader< ReadType >

Abstract class defining the fundamentals of any file reader.

Author
Alberto M. Esmoris Pena
Version
1.0
Template Parameters
ReadTypeType of what is read from file

Constructor & Destructor Documentation

◆ FileReader()

template<typename ReadType >
helios::filems::FileReader< ReadType >::FileReader ( string const &  path)
inline

Default constructor for file reader.

See also
filems::FileReader::path

Member Function Documentation

◆ getPath()

template<typename ReadType >
virtual string helios::filems::FileReader< ReadType >::getPath ( ) const
inlinevirtual

Obtain the path to the file to be read.

Returns
Path to the file to be read
See also
filems::FileReader::path

◆ read()

template<typename ReadType >
virtual ReadType helios::filems::FileReader< ReadType >::read ( )
pure virtual

◆ setPath()

template<typename ReadType >
virtual void helios::filems::FileReader< ReadType >::setPath ( string const &  path)
inlinevirtual

Member Data Documentation

◆ readingStrategy

template<typename ReadType >
shared_ptr<ReadingStrategy<ReadType> > helios::filems::FileReader< ReadType >::readingStrategy = nullptr
protected

The reading strategy to be used by the file reader.

See also
filems::ReadingStrategy

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