OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
SCell.h
Go to the documentation of this file.
1#ifndef OPAL_SCell_HH
2#define OPAL_SCell_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: SCell.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Template class SCell:
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:42 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
21#include <iosfwd>
24
25class ConstChannel;
26
27namespace Expressions {
28
29 // Class SCell
30 // ----------------------------------------------------------------------
32 // This expression returns the value in a table cell, identified by
33 // the table name, the row (a place reference), and the column (a name).
34
35 class SCell : public Scalar<double> {
36 public:
38 // Identify the table by its name [b]tab[/b], the row by the place
39 // reference [b]place[/b] and the column by its name [b]col[/b].
40 SCell(const std::string& tab, const PlaceRep& place, const std::string& col);
41
42 virtual ~SCell();
43
45 virtual Scalar<double>* clone() const;
46
48 // Evaluate the reference and return the value in that cell.
49 virtual double evaluate() const;
50
52 virtual void print(std::ostream& stream, int) const;
53
54 private:
55 // Not implemented.
57 void operator=(const SCell&);
58
59 // Names of table, of position, and of column, plus occurrence count.
60 const std::string tab_name;
62 const std::string col_name;
63
64 // The Chanel leading to the table cell.
66 };
67
68} // namespace Expressions
69
70#endif // OPAL_SCell_HH
Abstract interface for read-only access to variable.
A scalar expression referring to a table cell.
Definition SCell.h:35
virtual void print(std::ostream &stream, int) const
Print expression.
Definition SCell.cpp:46
void operator=(const SCell &)
ConstChannel * itsChannel
Definition SCell.h:65
const PlaceRep position
Definition SCell.h:61
virtual ~SCell()
Definition SCell.cpp:33
const std::string col_name
Definition SCell.h:62
const std::string tab_name
Definition SCell.h:60
virtual Scalar< double > * clone() const
Make clone.
Definition SCell.cpp:35
virtual double evaluate() const
Evaluate.
Definition SCell.cpp:37
Representation of a place within a beam line or sequence.
Definition PlaceRep.h:40
Representation objects and parsers for attribute expressions.