OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
TableRowRep.cpp
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2// $RCSfile: TableRowRep.cpp,v $
3// ------------------------------------------------------------------------
4// $Revision: 1.2 $
5// ------------------------------------------------------------------------
6// Copyright: see Copyright.readme
7// ------------------------------------------------------------------------
8//
9// Class: TableRowRep
10// A class used to represent a table row reference.
11//
12// ------------------------------------------------------------------------
13//
14// $Date: 2001/08/13 15:05:47 $
15// $Author: jowett $
16//
17// ------------------------------------------------------------------------
18
20#include <iostream>
21
22
23// Class TableRowRep
24// ------------------------------------------------------------------------
25
27 tabName(), position()
28{}
29
30
32 tabName(rhs.tabName), position(rhs.position)
33{}
34
35
36TableRowRep::TableRowRep(const std::string &tab, const PlaceRep &row):
37 tabName(tab), position(row)
38{}
39
40
42{}
43
44
46 tabName = rhs.tabName;
47 position = rhs.position;
48 return *this;
49}
50
51
52const std::string &TableRowRep::getTabName() const {
53 return tabName;
54}
55
56
58 return position;
59}
60
61
62void TableRowRep::print(std::ostream &os) const {
63 os << tabName << "->" << position;
64 return;
65}
Representation of a place within a beam line or sequence.
Definition: PlaceRep.h:41
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