OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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
21#include <iosfwd>
22#include <vector>
25
26namespace Expressions {
27
28 // Class ARow.
29 // ----------------------------------------------------------------------
31 // The result is an array formed by the values found in selected
32 // columns of a given row.
33
34 class ARow : public OArray<double> {
35 public:
37 // Identify the table by [b]tabName[/b] and the row by the place
38 // reference [b]row[/b]. The array [b]col[/b] contains the column
39 // names to select the columns by name.
40 ARow(const std::string& tabName, const PlaceRep& row, const std::vector<std::string>& col);
41
42 ARow(const ARow&);
43 ~ARow();
44
46 virtual OArray<double>* clone() const;
47
49 virtual std::vector<double> evaluate() const;
50
52 virtual void print(std::ostream& os, int precedence = 99) const;
53
54 private:
55 // Not implemented.
57 const ARow& operator=(const ARow&);
58
59 // The table name.
60 const std::string tabName;
61
62 // The row specification.
64
65 // The std::vector of column names.
66 const std::vector<std::string> columns;
67 };
68
69} // namespace Expressions
70
71#endif // OPAL_ARow_HH
An array expression defined as a table row.
Definition ARow.h:34
const ARow & operator=(const ARow &)
virtual OArray< double > * clone() const
Make clone.
Definition ARow.cpp:37
const std::string tabName
Definition ARow.h:60
PlaceRep position
Definition ARow.h:63
virtual void print(std::ostream &os, int precedence=99) const
Print expression.
Definition ARow.cpp:45
virtual std::vector< double > evaluate() const
Evaluate.
Definition ARow.cpp:39
const std::vector< std::string > columns
Definition ARow.h:66
Representation of a place within a beam line or sequence.
Definition PlaceRep.h:40
Representation objects and parsers for attribute expressions.