Helios++
Helios software for LiDAR simulations
CharReadingStrategy.h
1 #pragma once
2 
3 #include <filems/read/strategies/SimpleReadingStrategy.h>
4 
5 #include <fstream>
6 
7 namespace helios { namespace filems{
8 
9 using std::fstream;
10 
19 protected:
20  // *** USING *** //
21  // *************** //
23 
24 public:
25  // *** CONSTRUCTION / DESTRUCTION *** //
26  // ************************************ //
31  CharReadingStrategy(ifstream &ifs) :
33  {}
34  virtual ~CharReadingStrategy() = default;
35 
36  // *** READING STRATEGY METHODS *** //
37  // ********************************** //
43  char read() override{
44  return ifs.get();
45  };
46 
47 };
48 
49 }}
Class defining the strategy to read char by char from a file input stream.
Definition: CharReadingStrategy.h:18
char read() override
Read character from text file.
Definition: CharReadingStrategy.h:43
CharReadingStrategy(ifstream &ifs)
Default constructor for char reading strategy.
Definition: CharReadingStrategy.h:31
Class defining the strategy to read from a simple file input stream.
Definition: SimpleReadingStrategy.h:20
ifstream & ifs
Reference to the input file stream to read from.
Definition: SimpleReadingStrategy.h:27