OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ElementImage.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: ElementImage.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: ElementImage
10 // Contains two std::strings, representing the element name and type, and a
11 // map of its attributes used to represent this element's state.
12 //
13 // ------------------------------------------------------------------------
14 // Class category: AbsBeamline
15 // ------------------------------------------------------------------------
16 //
17 // $Date: 2000/03/27 09:32:31 $
18 // $Author: fci $
19 //
20 // ------------------------------------------------------------------------
21 //
22 
24 
25 
26 // Class ElementImage
27 // ------------------------------------------------------------------------
28 
29 
31  AttributeSet()
32 {}
33 
35  AttributeSet(right),
36  elementName(right.elementName),
37  elementType(right.elementType)
38 {}
39 
40 ElementImage::ElementImage(const std::string &name, const std::string &type,
41  const AttributeSet &attrib):
42  AttributeSet(attrib),
43  elementName(name),
44  elementType(type)
45 {}
46 
48 {}
49 
50 
53  elementName = right.elementName;
54  elementType = right.elementType;
55  return *this;
56 }
57 
58 
59 const std::string &ElementImage::getName() const {
60  return elementName;
61 }
62 
63 
64 void ElementImage::setName(const std::string &name) {
65  elementName = name;
66 }
67 
68 
69 const std::string &ElementImage::getType() const {
70  return elementType;
71 }
72 
73 
74 void ElementImage::setType(const std::string &type) {
75  elementType = type;
76 }
Map of std::string versus double value.
Definition: AttributeSet.h:41
const ElementImage & operator=(const ElementImage &)
Assignment operator.
const std::string & getName() const
Get element name.
std::string elementType
Definition: ElementImage.h:71
An image of an element.
Definition: ElementImage.h:35
void setName(const std::string &name)
Set element name.
virtual ~ElementImage()
std::string elementName
Definition: ElementImage.h:68
const AttributeSet & operator=(const AttributeSet &)
const std::string name
void setType(const std::string &type)
Set element type std::string.
const std::string & getType() const
Get element type std::string.