class
ElementFactory
: public Factory
(Return to index)
Concrete factory class for CLASSIC elements.
Defines the beamline element creation via the factory pattern.
When the factory is constructed, empty elements are first created and
stored.
{p}
With the makeElement() method, these elements can be cloned and then
filled in with from an ElementImage. The factory also implements an
element repository which can store beam lines.
Type: |
Instantiable |
Superclasses: |
public Factory |
Include file: |
./Construction/ElementFactory.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
-
ElementFactory
()
;
-
virtual ~ElementFactory
()
;
-
virtual bool define
(ElementBase*)
;
-
virtual void erase
(const string&)
;
-
virtual ElementBase* find
(const string&)const
;
-
virtual ElementBase* makeElement
(const string&,const string&,const AttributeSet&)
;
-
virtual bool storeElement
(ElementBase*)
;
-
typedef std::map<string,ElementBase*,std::less<string> > MapType
;
Documentation:
- Public members:
-
ElementFactory
()
;
- Default constructor.
Fills the repository with all standard element definitions.
-
virtual bool define
(ElementBase*)
;
- Define a new element.
The element newElement is linked to the repository.
If an element with the same name exists already, replacement is
rejected, and newElement is deleted.
-
virtual void erase
(const string&)
;
- Erase element by name.
If there is no element with the given name,
the request is ignored.
-
virtual ElementBase* find
(const string&)const
;
- Find element by name.
If an element with the name name exists,
return a pointer to this element, otherwise return NULL.
-
virtual ElementBase* makeElement
(const string&,const string&,const AttributeSet&)
;
- Make new element.
Create a new element with the type type, the name name
and the attributes in set.
If an element with the name name already exists, it is replaced.
-
virtual bool storeElement
(ElementBase*)
;
- Define a new element.
The element newElement is linked to the repository.
If an element with the same name exists already, it is replaced.
Documentation generated by fci on Mon Feb 7 11:41:37 2000