OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
ARow.h
Go to the documentation of this file.
1#ifndef OPAL_ARow_HH
2#define OPAL_ARow_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: ARow.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: ARow
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:41 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
23#include <iosfwd>
24#include <vector>
25
26
27namespace Expressions {
28
29 // Class ARow.
30 // ----------------------------------------------------------------------
32 // The result is an array formed by the values found in selected
33 // columns of a given row.
34
35 class ARow: public OArray<double> {
36
37 public:
38
40 // Identify the table by [b]tabName[/b] and the row by the place
41 // reference [b]row[/b]. The array [b]col[/b] contains the column
42 // names to select the columns by name.
43 ARow(const std::string &tabName, const PlaceRep &row,
44 const std::vector<std::string> &col);
45
46 ARow(const ARow &);
47 ~ARow();
48
50 virtual OArray<double> *clone() const;
51
53 virtual std::vector<double> evaluate() const;
54
56 virtual void print(std::ostream &os, int precedence = 99) const;
57
58 private:
59
60 // Not implemented.
62 const ARow &operator=(const ARow &);
63
64 // The table name.
65 const std::string tabName;
66
67 // The row specification.
69
70 // The std::vector of column names.
71 const std::vector<std::string> columns;
72 };
73
74}
75
76#endif // OPAL_ARow_HH
Representation objects and parsers for attribute expressions.
Definition: Expressions.h:64
An array expression.
Definition: Expressions.h:142
Representation of a place within a beam line or sequence.
Definition: PlaceRep.h:41
An array expression defined as a table row.
Definition: ARow.h:35
const ARow & operator=(const ARow &)
virtual OArray< double > * clone() const
Make clone.
Definition: ARow.cpp:46
const std::string tabName
Definition: ARow.h:65
PlaceRep position
Definition: ARow.h:68
virtual void print(std::ostream &os, int precedence=99) const
Print expression.
Definition: ARow.cpp:58
virtual std::vector< double > evaluate() const
Evaluate.
Definition: ARow.cpp:51
const std::vector< std::string > columns
Definition: ARow.h:71