38 const Entry entries[] = {
61 geometry(multipole.geometry),
62 field(multipole.field)
83 if(aKey[0] ==
'A' || aKey[0] ==
'B') {
86 for(std::string::size_type k = 1; k < aKey.length(); k++) {
87 if(isdigit(aKey[k])) {
88 n = 10 * n + aKey[k] -
'0';
104 for(
const Entry *entry = entries; entry->name != 0; ++entry) {
105 if(aKey == entry->name) {
107 (*
this, entry->get, entry->set);
128 for(
const Entry *entry = entries; entry->name != 0; ++entry) {
129 image->
setAttribute(entry->name, (this->*(entry->get))());
142 std::string
name(
" ");
143 while(p > buffer) name += *--p;
double getNormalComponent(int n) const
Get normal component.
void setSkewComponent(int, double)
Set skew component.
virtual ElementBase * clone() const
Return clone.
Interface for basic beam line object.
virtual void setField(const BMultipoleField &field)
Set mulitpole field.
Representation for a general multipole.
virtual void setName(const std::string &name)
Set element name.
virtual ElementImage * getImage() const
Construct an image.
void setNormalComponent(int, double)
Set normal component.
virtual void setElementLength(double length)
Set design length.
virtual Channel * getChannel(const std::string &aKey, bool create=false)
Construct a read/write channel.
virtual StraightGeometry & getGeometry()
Get geometry.
Representation of a perturbed multipole.
virtual const std::string & getName() const
Get element name.
virtual BMultipoleField & getField()
Get field.
Interface for general multipole.
Access to an indexed [b]double[/b] data member.
BMultipoleField field
Multipole field.
virtual double getElementLength() const
Get design length.
double getSkewComponent(int n) const
Get skew component.
virtual ElementImage * getImage() const
Construct an image.
void setAttribute(const std::string &aKey, double val)
Set value of an attribute.
StraightGeometry geometry
Multipole geometry.
A geometry representing a straight line.
Abstract interface for read/write access to variable.
The magnetic field of a multipole.
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
int order() const
Return order.
virtual ElementBase * makeFieldWrapper()
Allow field errors.
Access to a [b]double[/b] data member.