Helios++
Helios software for LiDAR simulations
helios::filems::BinaryFileReader Class Reference

Class for byte by byte reading of binary files. More...

#include <BinaryFileReader.h>

Inheritance diagram for helios::filems::BinaryFileReader:
Collaboration diagram for helios::filems::BinaryFileReader:

Public Member Functions

 BinaryFileReader (string const &path, ios_base::openmode openMode=ios_base::in)
 Default constructor for binary file reader. More...
 
- Public Member Functions inherited from helios::filems::SimpleFileReader< int >
 SimpleFileReader (string const &path, ios_base::openmode openMode=ios_base::in)
 Default constructor for simple file reader. More...
 
int 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...
 
- Public Member Functions inherited from helios::filems::FileReader< ReadType >
 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 binary reading strategy for the binary file reader. More...
 

Additional Inherited Members

- Protected Attributes inherited from helios::filems::SimpleFileReader< int >
ifstream ifs
 The input file stream to read from.
 
ios_base::openmode openMode
 The open mode flags for the input file stream. More...
 
- Protected Attributes inherited from helios::filems::FileReader< ReadType >
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

Class for byte by byte reading of binary files.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
filems::SimpleFileReader

Constructor & Destructor Documentation

◆ BinaryFileReader()

helios::filems::BinaryFileReader::BinaryFileReader ( string const &  path,
ios_base::openmode  openMode = ios_base::in 
)
inline

Default constructor for binary file reader.

See also
filems::SimpleFileReader::SimpleFileReader

Member Function Documentation

◆ makeStrategy()

void helios::filems::BinaryFileReader::makeStrategy ( )
inlineoverrideprotectedvirtual

Build a binary reading strategy for the binary file reader.

See also
FileReader::makeStrategy

Implements helios::filems::FileReader< ReadType >.


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