SimplestParsing.h
Go to the documentation of this file.
1 #pragma once
2 #include <exception>
3 #include <iostream>
4 #include <sstream>
5 #include <string.h>
6 
7 namespace FileParsing
8 {
9 
11 {
12 public:
13  SimplestParsing(void);
14  virtual ~SimplestParsing(void);
15 
19  std::stringstream & operator()();
20 
26  bool find(const std::string &);
27 
32  bool checkIfNextString(const std::string &);
33 
37  bool jumpSeparators();
38 
42  void load(const char * filename);
43 
44 private:
45  std::stringstream stream_;
46 };
47 } // namespace FileParsing
FileParsing
Definition: SimplestParsing.h:7
FileParsing::SimplestParsing::SimplestParsing
SimplestParsing(void)
FileParsing::SimplestParsing
Definition: SimplestParsing.h:10
FileParsing::SimplestParsing::load
void load(const char *filename)
Opens a file and stores its content into a buffer.
FileParsing::SimplestParsing::~SimplestParsing
virtual ~SimplestParsing(void)
FileParsing::SimplestParsing::checkIfNextString
bool checkIfNextString(const std::string &)
Checks if the next string in the file is a given one, if it is, the stream will be at the end of the ...
FileParsing::SimplestParsing::find
bool find(const std::string &)
looks for the string in the file (non optimized version, efficient with small files)....
FileParsing::SimplestParsing::operator()
std::stringstream & operator()()
returns the ifstream of the instance
FileParsing::SimplestParsing::jumpSeparators
bool jumpSeparators()
Jumps the blanks, tabs and all non text separators.