|
OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
Map of std::string versus double value. More...
#include <AttributeSet.h>
Public Types | |
| typedef std::map< std::string, double, std::less< std::string > > | NameMap |
| A map of name versus value. More... | |
| typedef NameMap::const_iterator | const_iterator |
| An iterator for a map of name versus value. More... | |
Public Member Functions | |
| AttributeSet () | |
| Default constructor. More... | |
| AttributeSet (const AttributeSet &) | |
| virtual | ~AttributeSet () |
| const AttributeSet & | operator= (const AttributeSet &) |
| const_iterator | begin () const |
| Iterator accessing first member. More... | |
| const_iterator | end () const |
| Iterator marking the end of the list. More... | |
| double | getAttribute (const std::string &aKey) const |
| Get attribute value. More... | |
| bool | hasAttribute (const std::string &aKey) const |
| Test for presence of an attribute. More... | |
| void | removeAttribute (const std::string &aKey) |
| Remove an existing attribute. More... | |
| void | setAttribute (const std::string &aKey, double val) |
| Set value of an attribute. More... | |
| Channel * | getChannel (const std::string &aKey, bool create=false) |
| Construct a read/write channel. More... | |
| const ConstChannel * | getConstChannel (const std::string &aKey) const |
| Construct a read-only channel. More... | |
Protected Attributes | |
| NameMap | itsMap |
| The attribute map. More... | |
Map of std::string versus double value.
Definition at line 41 of file AttributeSet.h.
| typedef NameMap::const_iterator AttributeSet::const_iterator |
An iterator for a map of name versus value.
Definition at line 49 of file AttributeSet.h.
| typedef std::map<std::string, double, std::less<std::string> > AttributeSet::NameMap |
A map of name versus value.
Definition at line 46 of file AttributeSet.h.
| AttributeSet::AttributeSet | ( | ) |
Default constructor.
Definition at line 30 of file AttributeSet.cpp.
| AttributeSet::AttributeSet | ( | const AttributeSet & | rhs | ) |
Definition at line 35 of file AttributeSet.cpp.
|
virtual |
Definition at line 40 of file AttributeSet.cpp.
|
inline |
Iterator accessing first member.
Definition at line 105 of file AttributeSet.h.
References itsMap.
Referenced by ElementBase::update().
|
inline |
Iterator marking the end of the list.
Definition at line 108 of file AttributeSet.h.
References itsMap.
Referenced by ElementBase::update().
| double AttributeSet::getAttribute | ( | const std::string & | aKey | ) | const |
| Channel * AttributeSet::getChannel | ( | const std::string & | aKey, |
| bool | create = false |
||
| ) |
Construct a read/write channel.
Definition at line 79 of file AttributeSet.cpp.
References itsMap.
Referenced by ElementBase::getChannel(), and getConstChannel().
| const ConstChannel * AttributeSet::getConstChannel | ( | const std::string & | aKey | ) | const |
Construct a read-only channel.
Definition at line 95 of file AttributeSet.cpp.
References getChannel().

| bool AttributeSet::hasAttribute | ( | const std::string & | aKey | ) | const |
Test for presence of an attribute.
Definition at line 61 of file AttributeSet.cpp.
References itsMap.
| const AttributeSet & AttributeSet::operator= | ( | const AttributeSet & | rhs | ) |
Definition at line 44 of file AttributeSet.cpp.
References itsMap.
| void AttributeSet::removeAttribute | ( | const std::string & | aKey | ) |
Remove an existing attribute.
Definition at line 66 of file AttributeSet.cpp.
References itsMap.
Referenced by ElementBase::removeAttribute().
| void AttributeSet::setAttribute | ( | const std::string & | aKey, |
| double | val | ||
| ) |
|
protected |
The attribute map.
Definition at line 98 of file AttributeSet.h.
Referenced by begin(), end(), getAttribute(), getChannel(), hasAttribute(), operator=(), removeAttribute(), and setAttribute().