OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Protected Attributes | List of all members
AttributeSet Class Reference

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

#include <AttributeSet.h>

Inheritance diagram for AttributeSet:
Inheritance graph
[legend]

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 AttributeSetoperator= (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...
 
ChannelgetChannel (const std::string &aKey, bool create=false)
 Construct a read/write channel. More...
 
const ConstChannelgetConstChannel (const std::string &aKey) const
 Construct a read-only channel. More...
 

Protected Attributes

NameMap itsMap
 The attribute map. More...
 

Detailed Description

Map of std::string versus double value.

Definition at line 41 of file AttributeSet.h.

Member Typedef Documentation

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.

Constructor & Destructor Documentation

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.

AttributeSet::~AttributeSet ( )
virtual

Definition at line 40 of file AttributeSet.cpp.

Member Function Documentation

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

Iterator accessing first member.

Definition at line 105 of file AttributeSet.h.

References itsMap.

Referenced by OpalElement::fillRegisteredAttributes(), and ElementBase::update().

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 OpalElement::fillRegisteredAttributes(), and ElementBase::update().

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

Get attribute value.

Definition at line 50 of file AttributeSet.cpp.

References itsMap.

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

Here is the call graph for this function:

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.

Referenced by ElementImage::operator=().

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 
)

Member Data Documentation

NameMap AttributeSet::itsMap
protected

The attribute map.

Definition at line 98 of file AttributeSet.h.

Referenced by begin(), end(), getAttribute(), getChannel(), hasAttribute(), operator=(), removeAttribute(), and setAttribute().


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