class
AttributeSet
(Return to index)
Map of string versus double value.
Class AttributeSet implements a map of name (string) versus value
(double) for user-defined attributes. This map is intended for
algorithms that require specific, but not predefined data in the
accelerator model for their working.
Type: |
Instantiable |
Include file: |
./AbsBeamline/AttributeSet.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
-
typedef std::map<string,double,std::less<string> > NameMap
;
-
typedef NameMap::const_iterator const_iterator
;
-
AttributeSet
()
;
-
AttributeSet
(const AttributeSet&)
;
-
virtual ~AttributeSet
()
;
-
const AttributeSet& operator=
(const AttributeSet&)
;
-
const_iterator begin
()const
;
-
const_iterator end
()const
;
-
double getAttribute
(const string&)const
;
-
bool hasAttribute
(const string&)const
;
-
void removeAttribute
(const string&)
;
-
void setAttribute
(const string&,double)
;
-
Channel* getChannel
(const string&)
;
-
const ConstChannel* getConstChannel
(const string&)const
;
- Protected Members:
Documentation:
- Public members:
-
AttributeSet
()
;
- Default constructor.
Constructs an empty map.
-
typedef std::map<string,double,std::less<string> > NameMap
;
- A map of name versus value.
-
const_iterator begin
()const
;
- Iterator accessing first member.
-
typedef NameMap::const_iterator const_iterator
;
- An iterator for a map of name versus value.
-
const_iterator end
()const
;
- Iterator marking the end of the list.
-
double getAttribute
(const string&)const
;
- Get attribute value.
If the attribute does not exist, return zero.
-
Channel* getChannel
(const string&)
;
- Construct a read/write channel.
This method constructs a Channel permitting read/write access to
the attribute aKey and returns it.
If the attribute does not exist, it returns NULL.
-
const ConstChannel* getConstChannel
(const string&)const
;
- Construct a read-only channel.
This method constructs a Channel permitting read-only access to
the attribute aKey and returns it.
If the attribute does not exist, it returns NULL.
-
bool hasAttribute
(const string&)const
;
- Test for presence of an attribute.
If the attribute exists, return true, otherwise false.
-
void removeAttribute
(const string&)
;
- Remove an existing attribute.
If the key aKey exists, this method removes it.
-
void setAttribute
(const string&,double)
;
- Set value of an attribute.
- Protected members:
-
NameMap itsMap
;
- The attribute map.
Documentation generated by fci on Mon Feb 7 11:41:31 2000