Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
IParser.h
1 #ifndef IParser_h
2 #define IParser_h 1
3 
4 #include <string>
5 #include <map>
6 #include <memory>
7 
8 namespace marlin{
9 
10  typedef std::map< std::string , std::map< std::string, std::string > > CommandLineParametersMap ;
11 
12  class StringParameters ;
13 
19  class IParser {
20 
21  public:
22 
23  virtual ~IParser() { /* no_op */ }
24 
26  virtual void parse() =0 ;
27 
29  virtual void setCmdLineParameters( const CommandLineParametersMap & cmdlineparams ) = 0 ;
30 
32  virtual std::shared_ptr<StringParameters> getParameters( const std::string& sectionName ) const =0 ;
33 
35  virtual void write(const std::string& fname) const =0 ;
36 
37  };
38 
39 }
40 #endif
virtual void setCmdLineParameters(const CommandLineParametersMap &cmdlineparams)=0
set command line parameters
Interface for a parser of a steering file to be used with marlin.
Definition: IParser.h:19
virtual void parse()=0
Parse the input file.
virtual void write(const std::string &fname) const =0
Write down the parsed file in a new file.
virtual std::shared_ptr< StringParameters > getParameters(const std::string &sectionName) const =0
Return the StringParameters defined for this section of the steering file.