OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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 
36 TableRowRep::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 
52 const std::string &TableRowRep::getTabName() const {
53  return tabName;
54 }
55 
56 
58  return position;
59 }
60 
61 
62 void TableRowRep::print(std::ostream &os) const {
63  os << tabName << "->" << position;
64  return;
65 }
const TableRowRep & operator=(const TableRowRep &)
Definition: TableRowRep.cpp:45
Representation of a table row reference.
Definition: TableRowRep.h:36
Representation of a place within a beam line or sequence.
Definition: PlaceRep.h:41
TableRowRep()
Default constructor.
Definition: TableRowRep.cpp:26
PlaceRep position
Definition: TableRowRep.h:66
PlaceRep getPosition() const
Return the row position representation.
Definition: TableRowRep.cpp:57
void print(std::ostream &os) const
Print in input format.
Definition: TableRowRep.cpp:62
const std::string & getTabName() const
Return the table name.
Definition: TableRowRep.cpp:52
std::string tabName
Definition: TableRowRep.h:65