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