OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Constraint.h
Go to the documentation of this file.
1#ifndef OPAL_CONSTRAINT_HH
2#define OPAL_CONSTRAINT_HH
3
5
6class Constraint: public Definition {
7public:
10
11 virtual Constraint *clone(const std::string &name);
12
13 virtual void execute();
14
15 std::string getExpression() const;
16private:
17 Constraint(const std::string &name,
18 Constraint *parent);
19};
20
21inline
22Constraint* Constraint::clone(const std::string &name) {
23 return new Constraint(name, this);
24}
25
26#endif
const std::string name
The base class for all OPAL definitions.
Definition: Definition.h:30
std::string getExpression() const
Definition: Constraint.cpp:31
virtual void execute()
Execute the command.
Definition: Constraint.cpp:27
virtual Constraint * clone(const std::string &name)
Return a clone.
Definition: Constraint.h:22