OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
RealVariable.h
Go to the documentation of this file.
1 #ifndef OPAL_RealVariable_HH
2 #define OPAL_RealVariable_HH
3 // ------------------------------------------------------------------------
4 // $RCSfile: RealVariable.h,v $
5 // ------------------------------------------------------------------------
6 // $Revision: 1.1.1.1 $
7 // ------------------------------------------------------------------------
8 // Copyright: see Copyright.readme
9 // ------------------------------------------------------------------------
10 //
11 // Class: RealVariable
12 //
13 // ------------------------------------------------------------------------
14 //
15 // $Date: 2000/03/27 09:33:49 $
16 // $Author: Andreas Adelmann $
17 //
18 // ------------------------------------------------------------------------
19 
21 
22 // Class RealVariable
23 // ------------------------------------------------------------------------
25 
27 
28 public:
29 
31  RealVariable();
32 
34  RealVariable(const std::string &name, RealVariable *parent, double value);
35 
36  virtual ~RealVariable();
37 
39  // True, if [b]rhs[/b] is a real variable.
40  virtual bool canReplaceBy(Object *rhs);
41 
43  virtual RealVariable *clone(const std::string &name);
44 
46  virtual void print(std::ostream &) const;
47 
49  virtual void printValue(std::ostream &os) const;
50 
52  virtual double getReal() const;
53 
54 private:
55 
56  // Not implemented.
57  RealVariable(const RealVariable &);
58  void operator=(const RealVariable &);
59 
60  // Clone constructor.
61  RealVariable(const std::string &name, RealVariable *parent);
62 };
63 
64 #endif // OPAL_RealVariable_HH
RealVariable()
Exemplar constructor.
virtual void printValue(std::ostream &os) const
Print its value.
virtual double getReal() const
Return value.
Attribute & value()
Return the attribute representing the value of the definition.
The REAL VARIABLE definition.
Definition: RealVariable.h:26
virtual bool canReplaceBy(Object *rhs)
Test for allowed replacement.
virtual ~RealVariable()
virtual void print(std::ostream &) const
Print the variable.
void operator=(const RealVariable &)
virtual RealVariable * clone(const std::string &name)
Make clone.
The base class for all OPAL objects.
Definition: Object.h:48
The base class for all OPAL value definitions.
const std::string name