Helios++
Helios software for LiDAR simulations
|
Public Member Functions | |
BufferedLineFileReader (string const &path, std::ios_base::openmode openMode=std::ios_base::in, long const maxCharsPerLine=8192, size_t const bufferSize=100000) | |
Default constructor for buffered line file reader. | |
virtual size_t | getBufferSize () |
Obtain the buffer size for the buffered line file reader. More... | |
virtual void | setBufferSize (size_t const bufferSize) |
Get the buffer size for the buffered line file reader. More... | |
![]() | |
LineFileReader (string const &path, std::ios_base::openmode openMode=std::ios_base::in, long const maxCharsPerLine=8192, bool const constructStrategy=true) | |
Default constructor for line file reader. More... | |
virtual long | getMaxCharsPerLine () |
Obtain the maximum number of characters per line. More... | |
virtual void | setMaxCharsPerLine (long const maxCharsPerLine) |
Set the maximum number of characters per line and update strategy accordingly. More... | |
![]() | |
SimpleFileReader (string const &path, ios_base::openmode openMode=ios_base::in) | |
Default constructor for simple file reader. More... | |
string | read () override |
Read from file simply by applying the reading strategy. Therefore, there is no concurrency handling mechanism and usage of simple file reader is not thread safe. More... | |
void | setPath (string const &path) override |
Set the path to the file to be read, also opening the input stream for the new file and updating the strategy. It assures the previous input file stream is closed before opening the new one. More... | |
![]() | |
FileReader (string const &path) | |
Default constructor for file reader. More... | |
virtual string | getPath () const |
Obtain the path to the file to be read. More... | |
Protected Member Functions | |
void | makeStrategy () override |
Build a buffered line reading strategy for the buffered line file reader. More... | |
virtual void | makeBufferedStrategy () |
Define the building of the buffered reading strategy itself. More... | |
![]() | |
void | makeStrategy () override |
Build a line reading strategy for the line file reader. More... | |
Protected Attributes | |
LineReadingStrategy | lrs |
The line reading strategy to be used for each single reading operation. More... | |
size_t | bufferSize |
The buffer size for the buffered strategy. | |
long | maxCharsPerLine |
The maximum number of characters that a line is expected to have. More... | |
![]() | |
long | maxCharsPerLine |
The maximum number of characters that a line is expected to have. More... | |
![]() | |
ifstream | ifs |
The input file stream to read from. | |
ios_base::openmode | openMode |
The open mode flags for the input file stream. More... | |
![]() | |
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... | |
|
inlinevirtual |
Obtain the buffer size for the buffered line file reader.
|
inlineprotectedvirtual |
Define the building of the buffered reading strategy itself.
|
inlineoverrideprotectedvirtual |
Build a buffered line reading strategy for the buffered line file reader.
Implements helios::filems::FileReader< ReadType >.
|
inlinevirtual |
Get the buffer size for the buffered line file reader.
bufferSize | The new buffer size for the buffered line file reader |
|
protected |
The line reading strategy to be used for each single reading operation.
|
protected |
The maximum number of characters that a line is expected to have.
If a file having lines of more than maxCharsPerLine characters is read, then problems might arise