OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
AColumn.h
Go to the documentation of this file.
1#ifndef OPAL_AColumn_HH
2#define OPAL_AColumn_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: AColumn.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: AColumn
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:41 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
23#include <iosfwd>
24
25class Table;
26
27
28namespace Expressions {
29
30 // Class AColumn.
31 // ----------------------------------------------------------------------
33 // The result is defined as the values contained in that column,
34 // delimited by a range.
35
36 class AColumn: public OArray<double> {
37
38 public:
39
41 // Use table name [b]tName[/b], column name [b]cName[/b], and range
42 // representation [b]rng[/b].
43 AColumn(const std::string &tName, const std::string &cName,
44 const RangeRep &rng);
45
46 AColumn(const AColumn &);
47 ~AColumn();
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 AColumn &operator=(const AColumn &);
63
64 // Table and column name.
65 const std::string tab_name;
66 const std::string col_name;
67
68 // The range specification.
70 };
71
72}
73
74#endif // OPAL_AColumn_HH
Representation objects and parsers for attribute expressions.
Definition: Expressions.h:64
An array expression.
Definition: Expressions.h:142
Representation of a range within a beam line or sequence.
Definition: RangeRep.h:34
The base class for all OPAL tables.
Definition: Table.h:42
An array expression defined as a table column.
Definition: AColumn.h:36
virtual std::vector< double > evaluate() const
Evaluate.
Definition: AColumn.cpp:53
virtual OArray< double > * clone() const
Make clone.
Definition: AColumn.cpp:48
RangeRep itsRange
Definition: AColumn.h:69
virtual void print(std::ostream &os, int precedence=99) const
Print expression.
Definition: AColumn.cpp:60
const AColumn & operator=(const AColumn &)
const std::string col_name
Definition: AColumn.h:66
const std::string tab_name
Definition: AColumn.h:65