OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
SHash.h
Go to the documentation of this file.
1 #ifndef OPAL_SHash_HH
2 #define OPAL_SHash_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: SHash.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: SHash
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:42 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
22 #include <iosfwd>
23 
24 
25 namespace Expressions {
26 
27  // Template class SHash
28  // ----------------------------------------------------------------------
29 
30  // Forward declaration.
31  class ATable;
32 
33 
35  // Represents a ``#'' value in a TABLE() expression.
36 
37  class SHash: public Scalar<double> {
38 
39  public:
40 
42  // Store the TABLE() expression which will return the value of ``#''.
43  explicit SHash(const ATable &);
44 
45  SHash(const SHash &);
46  virtual ~SHash();
47 
49  virtual Scalar<double> *clone() const;
50 
52  virtual double evaluate() const;
53 
55  virtual void print(std::ostream &str, int precedence = 99) const;
56 
57  private:
58 
59  // Not implemented.
60  SHash();
61  void operator=(const SHash &);
62 
63  // The ATable object to which this SHash belongs.
64  // When evaluate() is called, the value for # is obtained from
65  // "itsTable".
66  const ATable &itsTable;
67  };
68 
69 }
70 
71 #endif // OPAL_SHash_HH
An array expression generated from a TABLE() function.
Definition: ATable.h:38
A scalar expression.
Definition: Expressions.h:79
void operator=(const SHash &)
virtual void print(std::ostream &str, int precedence=99) const
Print expression.
Definition: SHash.cpp:55
const ATable & itsTable
Definition: SHash.h:66
virtual ~SHash()
Definition: SHash.cpp:41
virtual Scalar< double > * clone() const
Make clone.
Definition: SHash.cpp:45
virtual double evaluate() const
Evaluate.
Definition: SHash.cpp:50
A scalar expression.
Definition: SHash.h:37