Design Patterns
program_node_builder.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef STRUCTURAL_FACADE_PROGRAM_NODE_BUILDER_H_
7 #define STRUCTURAL_FACADE_PROGRAM_NODE_BUILDER_H_
8 
10 
11 namespace structural
12 {
13 namespace facade
14 {
16 {
17  public:
19  virtual ~ProgramNodeBuilder();
20 
21  virtual ProgramNodeInterface *NewVariable(std::string& variableName) override;
22  virtual ProgramNodeInterface *NewAssignment(ProgramNodeInterface* variable, ProgramNodeInterface* expression) override;
24  virtual ProgramNodeInterface *NewCondition(ProgramNodeInterface* condition, ProgramNodeInterface* truePart, ProgramNodeInterface* falsePart) override;
25  virtual ProgramNodeInterface *GetRootNode() const override;
26 
27  private:
28  ProgramNodeInterface* node_;
29 };
30 }
31 }
32 
33 #endif
34 
Definition: shape_interface.h:11
virtual ProgramNodeInterface * NewCondition(ProgramNodeInterface *condition, ProgramNodeInterface *truePart, ProgramNodeInterface *falsePart) override
Definition: program_node_builder.cc:44
virtual ~ProgramNodeBuilder()
Definition: program_node_builder.cc:18
virtual ProgramNodeInterface * NewVariable(std::string &variableName) override
Definition: program_node_builder.cc:20
Definition: program_node_builder_interface.h:17
Definition: program_node_interface.h:15
virtual ProgramNodeInterface * GetRootNode() const override
Definition: program_node_builder.cc:49
virtual ProgramNodeInterface * NewReturnStatement(ProgramNodeInterface *value) override
Definition: program_node_builder.cc:39
ProgramNodeBuilder()
Definition: program_node_builder.cc:13
virtual ProgramNodeInterface * NewAssignment(ProgramNodeInterface *variable, ProgramNodeInterface *expression) override
Definition: program_node_builder.cc:34
Definition: program_node_builder.h:15