OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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// Class Action
24// ------------------------------------------------------------------------
26// It implements the common behavior of actions, it can also be used via
27// dynamic casting to determine whether an object represents an action.
28
29class Action : public Object {
30public:
31 virtual ~Action();
32
34 // Always return [b]true[/b].
35 virtual bool canReplaceBy(Object* object);
36
38 // Return the string "ACTION".
39 virtual const std::string getCategory() const;
40
42 // If true, the object's execute() function should be traced.
43 // Always true for actions.
44 virtual bool shouldTrace() const;
45
47 // If true, the data structure should be updated before calling execute().
48 // Always true for actions.
49 virtual bool shouldUpdate() const;
50
51protected:
53 Action(int size, const char* name, const char* help);
54
56 Action(const std::string& name, Action* parent);
57
58private:
59 // Not implemented.
61 Action(const Action&);
62 void operator=(const Action&);
63};
64
65#endif // OPAL_Action_HH
The base class for all OPAL actions.
Definition Action.h:29
virtual bool shouldUpdate() const
Update flag.
Definition Action.cpp:32
virtual const std::string getCategory() const
Return the object category as a string.
Definition Action.cpp:28
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
Definition Action.cpp:26
virtual ~Action()
Definition Action.cpp:24
void operator=(const Action &)
Action(const Action &)
virtual bool shouldTrace() const
Trace flag.
Definition Action.cpp:30
The base class for all OPAL objects.
Definition Object.h:45