VERB4D
Parameters.h
Go to the documentation of this file.
1 
10 #ifndef PARAMETERS_H_
11 #define PARAMETERS_H_
12 
13 #include <string>
14 #include <iostream>
15 #include <sstream>
16 #include <fstream>
17 #include <vector>
18 
19 #include <stdio.h>
20 #include <stdlib.h>
21 using namespace std;
22 
23 #include "Logger.h"
24 
25 
29 class Parameters : public stringstream {
30 private:
32  ifstream parametersFile;
34  vector<string> argv;
35 
36 public:
37  Parameters(string filename, int argc = 1, char* argv[] = NULL);
38  ~Parameters();
39 
40  void close();
41 
43  Parameters& findParameter(string parameterName, string defaultValue = "");
44 
46  template <typename T>
47  void getParameter(string parameterName, T &variable, bool mustBeFound = false);
48 
49 
50 };
51 
52 
53 #endif /* PARAMETERS_H_ */
Holds the parameters along with their corresponding file and arguments.
Definition: Parameters.h:29
Logs the messages sent, including information, warnings, and errors.