OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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
25namespace 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.
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".
67 };
68
69}
70
71#endif // OPAL_SHash_HH
Representation objects and parsers for attribute expressions.
Definition: Expressions.h:64
A scalar expression.
Definition: Expressions.h:71
An array expression generated from a TABLE() function.
Definition: ATable.h:38
A scalar expression.
Definition: SHash.h:37
const ATable & itsTable
Definition: SHash.h:66
virtual void print(std::ostream &str, int precedence=99) const
Print expression.
Definition: SHash.cpp:55
virtual Scalar< double > * clone() const
Make clone.
Definition: SHash.cpp:45
virtual double evaluate() const
Evaluate.
Definition: SHash.cpp:50
virtual ~SHash()
Definition: SHash.cpp:41
void operator=(const SHash &)