Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Attr< Index, ValueType > Class Template Reference

#include <MNAttr.h>

Inheritance diagram for Attr< Index, ValueType >:

Inheritance graph
[legend]
Collaboration diagram for Attr< Index, ValueType >:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { Value = Index }

Public Member Functions

 Attr (const ValueType &v)
 Attr (AttributeStore *valueStore)
virtual ~Attr ()
bool set (const ValueType &v)
 Internal function called by set().
bool set (const Attr &v)
 operator ValueType () const
Attroperator= (const ValueType &newval)
ValueType & operator-> ()
bool isSet () const

Detailed Description

template<unsigned int Index, class ValueType>
class Attr< Index, ValueType >

Part of the generic attribute management. An instantiated attribute template holds exactly one value and can be given a value (by the graph manager) exactly once.
Warning:
Attributes are intended to simplify/factorify the construction of stream handler. They should be initialized between constructor and initSH. They are in no way thread safe and they are not intended to be made thread safe.


Member Enumeration Documentation

template<unsigned int Index, class ValueType>
anonymous enum
 

Enumeration values:
Value 


Constructor & Destructor Documentation

template<unsigned int Index, class ValueType>
Attr< Index, ValueType >::Attr const ValueType &  v  )  [inline, explicit]
 

This constructor is used by AttributeStore::set() to hold a temporary variable for changing the value of an attribute member of a child class in a generic way.

template<unsigned int Index, class ValueType>
Attr< Index, ValueType >::Attr AttributeStore valueStore  )  [inline]
 

This constructor is used by child classes of SH to create an attribute member.

template<unsigned int Index, class ValueType>
virtual Attr< Index, ValueType >::~Attr  )  [inline, virtual]
 


Member Function Documentation

template<unsigned int Index, class ValueType>
bool Attr< Index, ValueType >::isSet  )  const [inline]
 

template<unsigned int Index, class ValueType>
Attr< Index, ValueType >::operator ValueType  )  const [inline]
 

In general, the SH child class can use its attributes like the values that they represent.

template<unsigned int Index, class ValueType>
ValueType& Attr< Index, ValueType >::operator->  )  [inline]
 

template<unsigned int Index, class ValueType>
Attr& Attr< Index, ValueType >::operator= const ValueType &  newval  )  [inline]
 

This is an initialization function. Restrain from using it instead of the set() function. It does not prevent re-setting.

template<unsigned int Index, class ValueType>
bool Attr< Index, ValueType >::set const Attr< Index, ValueType > &  v  )  [inline]
 

template<unsigned int Index, class ValueType>
bool Attr< Index, ValueType >::set const ValueType &  v  )  [inline]
 

Internal function called by set().


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:35:51 2005 for Komssys by doxygen 1.3.8