OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
AttributeSet Class Reference

Map of std::string versus double value. More...

#include <AttributeSet.h>

Collaboration diagram for AttributeSet:

Public Types

typedef std::map< std::string, double, std::less< std::string > > NameMap
 A map of name versus value.
typedef NameMap::const_iterator const_iterator
 An iterator for a map of name versus value.

Public Member Functions

 AttributeSet ()
 Default constructor.
 AttributeSet (const AttributeSet &)
virtual ~AttributeSet ()
const AttributeSetoperator= (const AttributeSet &)
const_iterator begin () const
 Iterator accessing first member.
const_iterator end () const
 Iterator marking the end of the list.
double getAttribute (const std::string &aKey) const
 Get attribute value.
bool hasAttribute (const std::string &aKey) const
 Test for presence of an attribute.
void removeAttribute (const std::string &aKey)
 Remove an existing attribute.
void setAttribute (const std::string &aKey, double val)
 Set value of an attribute.
ChannelgetChannel (const std::string &aKey, bool create=false)
 Construct a read/write channel.
const ConstChannelgetConstChannel (const std::string &aKey) const
 Construct a read-only channel.

Protected Attributes

NameMap itsMap
 The attribute map.

Detailed Description

Map of std::string versus double value.

Definition at line 41 of file AttributeSet.h.

Member Typedef Documentation

◆ const_iterator

typedef NameMap::const_iterator AttributeSet::const_iterator

An iterator for a map of name versus value.

Definition at line 49 of file AttributeSet.h.

◆ NameMap

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.

Constructor & Destructor Documentation

◆ AttributeSet() [1/2]

AttributeSet::AttributeSet ( )

Default constructor.

Definition at line 30 of file AttributeSet.cpp.

References itsMap.

Referenced by AttributeSet(), getConstChannel(), and operator=().

◆ AttributeSet() [2/2]

AttributeSet::AttributeSet ( const AttributeSet & rhs)

Definition at line 35 of file AttributeSet.cpp.

References AttributeSet(), and itsMap.

Here is the call graph for this function:

◆ ~AttributeSet()

AttributeSet::~AttributeSet ( )
virtual

Definition at line 40 of file AttributeSet.cpp.

Member Function Documentation

◆ begin()

AttributeSet::const_iterator AttributeSet::begin ( ) const
inline

Iterator accessing first member.

Definition at line 105 of file AttributeSet.h.

References itsMap.

Referenced by TBeamline< FlaggedElmPtr >::getChannel().

◆ end()

AttributeSet::const_iterator AttributeSet::end ( ) const
inline

Iterator marking the end of the list.

Definition at line 108 of file AttributeSet.h.

References itsMap.

Referenced by TBeamline< FlaggedElmPtr >::getChannel().

◆ getAttribute()

double AttributeSet::getAttribute ( const std::string & aKey) const

Get attribute value.

Definition at line 50 of file AttributeSet.cpp.

References itsMap.

◆ getChannel()

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 getConstChannel().

◆ getConstChannel()

const ConstChannel * AttributeSet::getConstChannel ( const std::string & aKey) const

Construct a read-only channel.

Definition at line 95 of file AttributeSet.cpp.

References AttributeSet(), and getChannel().

Here is the call graph for this function:

◆ hasAttribute()

bool AttributeSet::hasAttribute ( const std::string & aKey) const

Test for presence of an attribute.

Definition at line 61 of file AttributeSet.cpp.

References itsMap.

◆ operator=()

const AttributeSet & AttributeSet::operator= ( const AttributeSet & rhs)

Definition at line 44 of file AttributeSet.cpp.

References AttributeSet(), and itsMap.

Here is the call graph for this function:

◆ removeAttribute()

void AttributeSet::removeAttribute ( const std::string & aKey)

Remove an existing attribute.

Definition at line 66 of file AttributeSet.cpp.

References itsMap.

◆ setAttribute()

void AttributeSet::setAttribute ( const std::string & aKey,
double val )

Set value of an attribute.

Definition at line 71 of file AttributeSet.cpp.

References itsMap.

Member Data Documentation

◆ itsMap

NameMap AttributeSet::itsMap
protected

The documentation for this class was generated from the following files: