Design Patterns
Main Page
Namespaces
Classes
Files
File List
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
9
#include "
boolean_exp_interface.h
"
10
#include "
variable_exp_interface.h
"
11
12
namespace
operational
13
{
14
namespace
interpreter
15
{
16
class
VariableExp
:
public
BooleanExpInterface
,
public
VariableExpInterface
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
operational
Definition:
application.cc:10
operational::interpreter::BooleanExpInterface
Definition:
boolean_exp_interface.h:17
operational::interpreter::VariableExp::Replace
virtual BooleanExpInterface * Replace(const std::string &name, BooleanExpInterface &expression) override
Definition:
variable_exp.cc:29
operational::interpreter::VariableExp::Copy
virtual BooleanExpInterface * Copy() const override
Definition:
variable_exp.cc:19
variable_exp_interface.h
operational::interpreter::VariableExp
Definition:
variable_exp.h:16
boolean_exp_interface.h
operational::interpreter::InterpreterContextInterface
Definition:
interpreter_context_interface.h:17
operational::interpreter::VariableExp::VariableExp
VariableExp(const std::string &name)
Definition:
variable_exp.cc:12
operational::interpreter::VariableExp::name
virtual std::string name() const override
Definition:
variable_exp.cc:24
operational::interpreter::VariableExpInterface
Definition:
variable_exp_interface.h:15
operational::interpreter::VariableExp::Evaluate
virtual bool Evaluate(InterpreterContextInterface &context) override
Definition:
variable_exp.cc:14
src
operational
src
interpreter
variable_exp.h
Generated by
1.8.10