class
Element
: public Object
(Return to index)
The base class for all MAD elements.
It implements the common behaviour of elements, it can also be used via
dynamic casting to determine whether an object represents an element.
Each Element object contains a pointer to a CLASSIC beam line element.
This element is wrapped as required in a field wrapper and an AlignWrapper.
The assembly represents the element as it occurs in a beam line.
According to the setting of the sharable flag, the assembly is shared
or unique when used in more than one place. When shared, the wrappers
ensure one and the same imperfection for all shared occurrences. When
unique, each occurrence has its own imperfections. The ``design''
element is normally shared.
Type: |
Abstract |
Superclasses: |
public Object |
Include file: |
./AbstractObjects/Element.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
- Protected Members:
Documentation:
- Public members:
-
enum ReferenceType
;
- Reference for element positioning.
Used in the SEQUENCE command.
-
virtual bool canReplaceBy
(Object*)
;
- Test if replacement is allowed.
Return true, if the replacement is also an Element.
-
static Element* find
(const string&)
;
- Find named Element.
If an element with the name name exists,
return a pointer to that element.
If no such element exists, throw MadException.
-
virtual const string getCategory
()const
;
- Return the object category as a string.
Return the string "ELEMENT".
-
inline ElementBase* getElement
()const
;
- Return the embedded CLASSIC element.
Return a pointer to the embedded CLASSIC ElementBase
-
virtual double getEntrance
(ReferenceType)const
;
- Return arc length from origin to entrance (negative !).
-
virtual double getExit
(ReferenceType)const
;
- Return arc length from origin to exit (positive !).
-
virtual double getLength
()const
= 0
;
- Return element length.
-
inline void setElement
(ElementBase*)
;
- Assign new CLASSIC element.
-
virtual void setShared
(bool)
;
- Set shared flag.
If true, all references to this name are to the same object.
-
virtual bool shouldTrace
()const
;
- Trace flag.
If true, the object's execute() function should be traced.
Always false for elements.
-
virtual bool shouldUpdate
()const
;
- Update flag.
If true, the data structure should be updated before calling execute().
Always false for elements.
- Protected members:
-
Element
(int,const char*,const char*)
;
- Constructor for exemplars.
-
Element
(const string&,Element*)
;
- Constructor for clones.
Documentation generated by fci on Mon Feb 7 12:29:51 2000