OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
TableRowRep.h
Go to the documentation of this file.
1#ifndef OPAL_TableRowRep_HH
2#define OPAL_TableRowRep_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: TableRowRep.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: TableRowRep
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:35 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
22#include <string>
23
24class Table;
25
26
27// Class TableRowRep
28// ------------------------------------------------------------------------
30// Such a reference consists of two parts:
31// [ol]
32// [li]A table name,
33// [li]A place reference which selects the table row.
34// [/ol]
35
37
38public:
39
41 // Constructs undefined reference.
43
45 // Construct reference to the row identified by [b]row[/b] of the
46 // table with name [b]name[/b].
47 TableRowRep(const std::string &tab, const PlaceRep &row);
48
49 TableRowRep(const TableRowRep &);
51 const TableRowRep &operator=(const TableRowRep &);
52
54 const std::string &getTabName() const;
55
57 PlaceRep getPosition() const;
58
60 void print(std::ostream &os) const;
61
62private:
63
64 // Table row structure.
65 std::string tabName; // Table name.
66 PlaceRep position; // Position reference.
67};
68
69
70inline std::ostream &operator<<(std::ostream &os, const TableRowRep &row) {
71 row.print(os);
72 return os;
73}
74
75#endif // OPAL_TableRowRep_HH
std::ostream & operator<<(std::ostream &os, const TableRowRep &row)
Definition: TableRowRep.h:70
Representation of a place within a beam line or sequence.
Definition: PlaceRep.h:41
The base class for all OPAL tables.
Definition: Table.h:42
Representation of a table row reference.
Definition: TableRowRep.h:36
TableRowRep()
Default constructor.
Definition: TableRowRep.cpp:26
void print(std::ostream &os) const
Print in input format.
Definition: TableRowRep.cpp:62
const TableRowRep & operator=(const TableRowRep &)
Definition: TableRowRep.cpp:45
std::string tabName
Definition: TableRowRep.h:65
PlaceRep position
Definition: TableRowRep.h:66
PlaceRep getPosition() const
Return the row position representation.
Definition: TableRowRep.cpp:57
const std::string & getTabName() const
Return the table name.
Definition: TableRowRep.cpp:52