OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ElementImage.h
Go to the documentation of this file.
1 #ifndef CLASSIC_ElementImage_HH
2 #define CLASSIC_ElementImage_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: ElementImage.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: ElementImage
13 // Contains two std::strings, representing the element name and type, and a
14 // map of attributes used to represent this element's state.
15 //
16 // ------------------------------------------------------------------------
17 // Class category: AbsBeamline
18 // ------------------------------------------------------------------------
19 //
20 // $Date: 2000/03/27 09:32:31 $
21 // $Author: fci $
22 //
23 // ------------------------------------------------------------------------
24 
26 #include <string>
27 
28 // Class ElementImage
29 // ------------------------------------------------------------------------
31 // Class ElementImage implements an image of an element. It contains two
32 // std::strings, the name and the type of the element, and a map of name versus
33 // value for all attributes of the element.
34 
35 class ElementImage: public AttributeSet {
36 
37 public:
38 
40  // This constructor takes the [b]name[/b] and [b]type[/b] std::strings as
41  // arguments, as well as an AttributeSet mapping attribute names to
42  // values.
43  ElementImage(const std::string &name, const std::string &type,
44  const AttributeSet &map);
45 
46  ElementImage();
47  ElementImage(const ElementImage &);
48  virtual ~ElementImage();
49 
51  const ElementImage &operator=(const ElementImage &);
52 
54  void setName(const std::string &name);
55 
57  const std::string &getName() const;
58 
60  void setType(const std::string &type);
61 
63  const std::string &getType() const;
64 
65 private:
66 
67  // String representing element name
68  std::string elementName;
69 
70  // String representing element type
71  std::string elementType;
72 };
73 
74 #endif // CLASSIC_ElementImage_HH
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 std::string name
void setType(const std::string &type)
Set element type std::string.
const std::string & getType() const
Get element type std::string.