OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
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 
23 #include <iosfwd>
24 
25 class ConstChannel;
26 
27 
28 namespace Expressions {
29 
30  // Class SCell
31  // ----------------------------------------------------------------------
33  // This expression returns the value in a table cell, identified by
34  // the table name, the row (a place reference), and the column (a name).
35 
36  class SCell: public Scalar<double> {
37 
38  public:
39 
41  // Identify the table by its name [b]tab[/b], the row by the place
42  // reference [b]place[/b] and the column by its name [b]col[/b].
43  SCell(const std::string &tab, const PlaceRep &place, const std::string &col);
44 
45  virtual ~SCell();
46 
48  virtual Scalar<double> *clone() const;
49 
51  // Evaluate the reference and return the value in that cell.
52  virtual double evaluate() const;
53 
55  virtual void print(std::ostream &stream, int) const;
56 
57  private:
58 
59  // Not implemented.
60  SCell();
61  void operator=(const SCell &);
62 
63  // Names of table, of position, and of column, plus occurrence count.
64  const std::string tab_name;
66  const std::string col_name;
67 
68  // The Chanel leading to the table cell.
70  };
71 
72 }
73 
74 #endif // OPAL_SCell_HH
A scalar expression.
Definition: Expressions.h:71
virtual Scalar< double > * clone() const
Make clone.
Definition: SCell.cpp:43
void operator=(const SCell &)
const std::string col_name
Definition: SCell.h:66
const PlaceRep position
Definition: SCell.h:65
virtual double evaluate() const
Evaluate.
Definition: SCell.cpp:48
A scalar expression referring to a table cell.
Definition: SCell.h:36
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated place
Definition: LICENSE:162
Representation of a place within a beam line or sequence.
Definition: PlaceRep.h:41
ConstChannel * itsChannel
Definition: SCell.h:69
const std::string tab_name
Definition: SCell.h:64
virtual ~SCell()
Definition: SCell.cpp:38
virtual void print(std::ostream &stream, int) const
Print expression.
Definition: SCell.cpp:58
Abstract interface for read-only access to variable.
Definition: ConstChannel.h:29