OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Action.h
Go to the documentation of this file.
1#ifndef OPAL_Action_HH
2#define OPAL_Action_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: Action.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: Action
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:34 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
22
23
24// Class Action
25// ------------------------------------------------------------------------
27// It implements the common behavior of actions, it can also be used via
28// dynamic casting to determine whether an object represents an action.
29
30class Action: public Object {
31
32public:
33
34 virtual ~Action();
35
37 // Always return [b]true[/b].
38 virtual bool canReplaceBy(Object *object);
39
41 // Return the string "ACTION".
42 virtual const std::string getCategory() const;
43
45 // If true, the object's execute() function should be traced.
46 // Always true for actions.
47 virtual bool shouldTrace() const;
48
50 // If true, the data structure should be updated before calling execute().
51 // Always true for actions.
52 virtual bool shouldUpdate() const;
53
54protected:
55
57 Action(int size, const char *name, const char *help);
58
60 Action(const std::string &name, Action *parent);
61
62private:
63
64 // Not implemented.
66 Action(const Action &);
67 void operator=(const Action &);
68};
69
70#endif // OPAL_Action_HH
const std::string name
The base class for all OPAL actions.
Definition: Action.h:30
virtual bool shouldUpdate() const
Update flag.
Definition: Action.cpp:44
virtual const std::string getCategory() const
Return the object category as a string.
Definition: Action.cpp:34
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
Definition: Action.cpp:29
virtual ~Action()
Definition: Action.cpp:25
void operator=(const Action &)
Action(const Action &)
virtual bool shouldTrace() const
Trace flag.
Definition: Action.cpp:39
The base class for all OPAL objects.
Definition: Object.h:48