125 template <
typename T>
std::basic_string< CepsChar > CepsString
C++ format string.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
int32_t CepsInt
Need 32 bit integer.
Base class that regroups common reader functionalities.
virtual CepsBool good()
true if stream is still readable
FileReader & operator=(const FileReader &that)
Copy constructor.
virtual ~FileReader()
Destructor. Calls FileReader::close.
CepsUInt checkEOF()
Checks if the reader reached end of file.
FileReader & operator>>(T &var)
Reading operator.
CepsInt lineIndex(const CepsString &word)
Index of first line starting with word, search starting from the current stream position.
CepsUInt findNextOf(const CepsVector< CepsString > &patterns)
Advance stream until one of patterns is found.
void reset()
Set file stream to the beginning of the file.
virtual CepsBool open()
Opens the designated file in read mode.
FileReader()
Alternative constructor.
void oneLine(CepsString &line)
Get one line from the stream.
CepsUInt skipLines(CepsUInt nbLines)
Skip given number of lines.
void setFileName(const CepsString &fileName)
Set file to read.
CepsString m_fileName
file to open
CepsBool findNext(const CepsString &pattern)
Advance stream until pattern is found.
CepsString getFileName()
Name of parsed file.
std::ifstream m_file
stream
virtual void close()
Close the file.
CepsUInt find(const CepsString &pattern)
Advance stream until pattern is found.