class
MadElement
: public Element
(Return to index)
Base class for all beam line elements.
This class factors out all special behaviour for the DOOM interface
and the printing in MAD-8 format, as well as some common attributes.
It defines a registry for attribute cells, used in the ATTLIST command.
The class MadElement command stores all defined attribute values in
this registry, and the ATTLIST command can look them up to build up
a print line.
Type: |
Abstract |
Superclasses: |
public Element |
Include file: |
./Elements/MadElement.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
- Protected Members:
-
MadElement
(int,const char*,const char*)
;
-
MadElement
(const string&,MadElement*)
;
-
static void printMultipoleStrength
(std::ostream&,int,int&,const string&,const string&,const Attribute&,const Attribute&,const Attribute&)
;
-
static void printAttribute
(std::ostream&,const string&,const string&,int&)
;
-
static void printAttribute
(std::ostream&,const string&,double,int&)
;
-
static AttCell* registerRealAttribute
(const string&)
;
-
static AttCell* registerStringAttribute
(const string&)
;
-
static std::map<string,OwnPtr<AttCell> > attributeRegistry
;
-
bool builtin
;
-
bool modified
;
-
bool flagged
;
Documentation:
- Public members:
-
enum ValueFlag
;
- The common attributes for all elements.
Switch for value desired on ATTLIST command.
-
virtual void doomGet
(const DoomReader&)
;
- Read element from the DOOM data base.
Access the element attributes via the DOOM index table.
-
virtual void doomPut
(DoomWriter&)const
;
- Write element to the DOOM data base.
Access the element attributes via the DOOM index table.
-
virtual void fillRegisteredAttributes
(const ElementBase&,ValueFlag)
;
- Fill in all registered attributes.
-
static AttCell* findRegisteredAttribute
(const string&)
;
- Find a registered attribute.
Return a pointer to the AttCell for a named attribute.
-
virtual double getLength
()const
;
- Return element length.
-
const string getTypeName
()const
;
- Return the element's type name.
-
virtual void parse
(Statement&)
;
- Parse the element.
This special version for elements handles unknown attributes by
appending them to the attribute list.
-
virtual void print
(std::ostream&)const
;
- Print the object.
This special version handles special printing in MAD-8 format.
-
static void setRegisteredAttribute
(const string&,double)
;
- Store a registered real attribute.
-
static void setRegisteredAttribute
(const string&,const string&)
;
- Store a registered string attribute.
-
virtual void updateUnknown
(ElementBase*)
;
- Transmit the ``unknown'' (not known to MAD) attributes to CLASSIC.
- Protected members:
-
MadElement
(int,const char*,const char*)
;
- Exemplar constructor.
-
MadElement
(const string&,MadElement*)
;
- Clone constructor.
-
static std::map<string,OwnPtr<AttCell> > attributeRegistry
;
- The registry for named attributes.
-
static void printAttribute
(std::ostream&,const string&,const string&,int&)
;
- Print an attribute with a MAD-8 name (as an expression).
-
static void printAttribute
(std::ostream&,const string&,double,int&)
;
- Print an attribute with a MAD-8 name (as a constant).
-
static void printMultipoleStrength
(std::ostream&,int,int&,const string&,const string&,const Attribute&,const Attribute&,const Attribute&)
;
- Print multipole components in MAD-8 format.
This function is accessible to all multipole-like elements
(RBend, SBend, Quadrupole, Sextupole, Octupole, Multipole).
-
static AttCell* registerRealAttribute
(const string&)
;
- Register a ``real'' element attribute.
A registered attribute can be listed by the ATTLIST command.
-
static AttCell* registerStringAttribute
(const string&)
;
- Register a ``string'' element attribute.
A registered attribute can be listed by the ATTLIST command.
Documentation generated by fci on Mon Feb 7 12:29:59 2000