EPANET  3.0
EPANET Development Project
optionparser.h
Go to the documentation of this file.
1 /* EPANET 3
2  *
3  * Copyright (c) 2016 Open Water Analytics
4  * Licensed under the terms of the MIT License (see the LICENSE file for details).
5  *
6  */
7 
10 
11 #ifndef OPTIONPARSER_H_
12 #define OPTIONPARSER_H_
13 
14 #include <string>
15 #include <vector>
16 
17 class Network;
18 
21 
23 {
24  public:
25  OptionParser();
26  void parseOption(Network* network, std::vector<std::string>& tokens);
27  void parseTimeOption(Network* network, std::vector<std::string>& tokens);
28  void parseEnergyOption(Network* network, std::vector<std::string>& tokens);
29  void parseReactOption(Network* network, std::vector<std::string>& tokens);
30  void parseReportOption(Network* network, std::vector<std::string>& tokens);
31 
32  private:
33  std::string getEpanet3Keyword(const std::string& s1,
34  const std::string& s2,
35  std::string& value);
36  void setOption(const std::string& keyword,
37  const std::string& value,
38  Network* network);
39  void parseQualOption(const std::string& s2,
40  const std::string& s3,
41  Network* network);
42  void parseReportItems(int nodesOrLinks,
43  Network* network,
44  int nTokens,
45  std::string* tokens);
46  void parseReportField(Network* network,
47  int nTokens,
48  std::string* tokens);
49 
50 };
51 
52 #endif
Parses lines of project option data from a text file.
Definition: optionparser.h:22
Contains the data elements that describe a pipe network.
Definition: network.h:41