OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Constraint.h
Go to the documentation of this file.
1 #ifndef OPAL_CONSTRAINT_HH
2 #define OPAL_CONSTRAINT_HH
3 
5 
6 class Constraint: public Definition {
7 public:
8  Constraint();
9  ~Constraint();
10 
11  virtual Constraint *clone(const std::string &name);
12 
13  virtual void execute();
14 
15  std::string getExpression() const;
16 private:
17  Constraint(const std::string &name,
18  Constraint *parent);
19 };
20 
21 inline
22 Constraint* 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