Design Patterns
variable_exp.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 OPERATIONAL_INTERPRETER_VARIABLE_EXP_H_
7 #define OPERATIONAL_INTERPRETER_VARIABLE_EXP_H_
8 
10 #include "variable_exp_interface.h"
11 
12 namespace operational
13 {
14 namespace interpreter
15 {
17 {
18  public:
19  explicit VariableExp(const std::string& name);
20 
21  virtual bool Evaluate(InterpreterContextInterface& context) override;
22  virtual BooleanExpInterface *Replace(const std::string& name, BooleanExpInterface& expression) override;
23  virtual BooleanExpInterface *Copy() const override;
24 
25  virtual std::string name() const override;
26 
27  private:
28  std::string name_;
29 };
30 }
31 }
32 
33 #endif
34 
Definition: application.cc:10
Definition: boolean_exp_interface.h:17
virtual BooleanExpInterface * Replace(const std::string &name, BooleanExpInterface &expression) override
Definition: variable_exp.cc:29
virtual BooleanExpInterface * Copy() const override
Definition: variable_exp.cc:19
Definition: variable_exp.h:16
Definition: interpreter_context_interface.h:17
VariableExp(const std::string &name)
Definition: variable_exp.cc:12
virtual std::string name() const override
Definition: variable_exp.cc:24
Definition: variable_exp_interface.h:15
virtual bool Evaluate(InterpreterContextInterface &context) override
Definition: variable_exp.cc:14