EPANET  3.0
EPANET Development Project
controlparser.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 CONTROLPARSER_H_
12 #define CONTROLPARSER_H_
13 
14 #include <sstream>
15 #include <string>
16 
17 class Node;
18 class Link;
19 class Network;
20 
26 
28 {
29  public:
30  ControlParser();
31  ~ControlParser() {}
32  void parseControlLine(std::string& line, Network* network);
33 
34  private:
35  void initializeControlSettings();
36  void parseLinkSetting(Network* network);
37  void parseLevelSetting(Network* network);
38  void parseTimeSetting();
39  void parseTimeOfDaySetting();
40  void createControl(Network* network);
41 
42  std::istringstream sin;
43  int controlType;
44  Link* link;
45  int linkStatus;
46  double linkSetting;
47  Node* node;
48  int levelType;
49  double nodeSetting;
50  int timeSetting;
51 };
52 
53 #endif
A connection point between links in a network.
Definition: node.h:30
Parses a control statement from a line of text.
Definition: controlparser.h:27
Contains the data elements that describe a pipe network.
Definition: network.h:41