Package xal.smf.attr
Class AttributeBucket
java.lang.Object
xal.smf.attr.AttributeBucket
- All Implemented Interfaces:
Serializable
,DataListener
- Direct Known Subclasses:
AlignmentBucket
,ApertureBucket
,BPMBucket
,DisplaceBucket
,FieldMapBucket
,MagnetBucket
,RfCavityBucket
,RfGapBucket
,RfqDummyBucket
,RotationBucket
,SequenceBucket
,TwissBucket
The root class in the inheritance hierarchy of orthogonal sets of element
attributes (such as a set of multipole harmonics, a set of aperture
parameters, and others).
Derived classes should call registerAttribute() in their constructor on all
Attribute objects belonging to the attribute bucket.
- Author:
- Nikolay Malitsky, Christopher K. Allen
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AttributeBucket should only be instantiated by a derived class -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkAttribute
(String strName, int iType) Check attribute validityimplement DataListener interfacegetAttrDescription
(String strName) String[]
abstract String
getType()
Derived class must furnish a unique type idboolean
parseAttrValue
(String strName, String strVal) protected void
registerAttribute
(String strName, Attribute attr) Used by derived classes to define particular attributesprotected void
registerAttribute
(String strName, Attribute attr, String description) Used by derived classes to define particular attributesboolean
setAttrValue
(String strName, double newVal) boolean
setAttrValue
(String strName, double[] newVal) boolean
setAttrValue
(String strName, float newVal) boolean
setAttrValue
(String strName, float[] newVal) boolean
setAttrValue
(String strName, int newVal) boolean
setAttrValue
(String strName, int[] newVal) boolean
setAttrValue
(String strName, long newVal) boolean
setAttrValue
(String strName, long[] newVal) boolean
setAttrValue
(String strName, String newVal) boolean
setAttrValue
(String strName, String[] newVal) void
update
(DataAdaptor adaptor) implement DataListener interfacevoid
write
(DataAdaptor adaptor) implement DataListener interface
-
Constructor Details
-
AttributeBucket
protected AttributeBucket()AttributeBucket should only be instantiated by a derived class
-
-
Method Details
-
getType
Derived class must furnish a unique type id -
dataLabel
implement DataListener interface- Specified by:
dataLabel
in interfaceDataListener
- Returns:
- a tag that identifies the receiver's type
-
update
implement DataListener interface- Specified by:
update
in interfaceDataListener
- Parameters:
adaptor
- The adaptor from which to update the data- Throws:
NumberFormatException
-
write
implement DataListener interface- Specified by:
write
in interfaceDataListener
- Parameters:
adaptor
- The adaptor to which the receiver's data is written
-
getAttr
-
getAttrDescription
-
getAttrNames
-
parseAttrValue
- Throws:
NumberFormatException
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
setAttrValue
-
registerAttribute
Used by derived classes to define particular attributes -
registerAttribute
Used by derived classes to define particular attributes -
checkAttribute
Check attribute validity
-