OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
RealConstant.h
Go to the documentation of this file.
1 #ifndef OPAL_RealConstant_HH
2 #define OPAL_RealConstant_HH
3 // ------------------------------------------------------------------------
4 // $RCSfile: RealConstant.h,v $
5 // ------------------------------------------------------------------------
6 // $Revision: 1.1.1.1 $
7 // ------------------------------------------------------------------------
8 // Copyright: see Copyright.readme
9 // ------------------------------------------------------------------------
10 //
11 // Class: RealConstant
12 //
13 // ------------------------------------------------------------------------
14 //
15 // $Date: 2000/03/27 09:33:49 $
16 // $Author: Andreas Adelmann $
17 //
18 // ------------------------------------------------------------------------
19 
21 
22 
23 // Class RealConstant
24 // ------------------------------------------------------------------------
26 
28 
29 public:
30 
32  RealConstant();
33 
35  RealConstant(const std::string &name, RealConstant *parent, double value);
36 
37  virtual ~RealConstant();
38 
40  // Always false for constants.
41  virtual bool canReplaceBy(Object *object);
42 
44  virtual RealConstant *clone(const std::string &name);
45 
47  virtual void print(std::ostream &) const;
48 
50  virtual void printValue(std::ostream &os) const;
51 
53  virtual double getReal() const;
54 
55 private:
56 
57  // Not implemented.
58  RealConstant(const RealConstant &);
59  void operator=(const RealConstant &);
60 
61  // Clone constructor.
62  RealConstant(const std::string &name, RealConstant *parent);
63 };
64 
65 #endif // OPAL_RealConstant_HH
virtual RealConstant * clone(const std::string &name)
Make clone.
virtual double getReal() const
Return value.
Attribute & value()
Return the attribute representing the value of the definition.
virtual bool canReplaceBy(Object *object)
Test if object can be replaced.
virtual ~RealConstant()
The REAL CONSTANT definition.
Definition: RealConstant.h:27
void operator=(const RealConstant &)
RealConstant()
Exemplar constructor.
The base class for all OPAL objects.
Definition: Object.h:48
virtual void print(std::ostream &) const
Print the constant.
The base class for all OPAL value definitions.
const std::string name
virtual void printValue(std::ostream &os) const
Print its value.