OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Expressions::SRefAttr< T > Class Template Reference

An attribute defined as a reference to a scalar. More...

#include <Expressions.h>

Inheritance diagram for Expressions::SRefAttr< T >:
Inheritance graph
[legend]
Collaboration diagram for Expressions::SRefAttr< T >:
Collaboration graph
[legend]

Public Member Functions

 SRefAttr (const std::string &oName, const std::string &aName, int index)
 Constructor. More...
 
 SRefAttr (const SRefAttr &)
 
virtual ~SRefAttr ()
 
virtual SRefAttr< T > * clone () const
 Make clone. More...
 
virtual T evaluate () const
 Evaluate. More...
 
virtual double getReal ()
 Return real value. More...
 
virtual void invalidate ()
 Invalidate. More...
 
virtual void print (std::ostream &) const
 Print the reference. More...
 
virtual void set (const T &) const
 Store new value. More...
 
template<>
double getReal ()
 
- Public Member Functions inherited from AttributeBase
 AttributeBase ()
 
virtual ~AttributeBase ()
 
std::string getImage () const
 Convert to string. More...
 
virtual bool isExpression () const
 Test for expression. More...
 
- Public Member Functions inherited from RCObject
int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 

Private Member Functions

 SRefAttr ()
 
void operator= (const SRefAttr &)
 
void fill () const
 

Private Attributes

const std::string obj_name
 
const std::string att_name
 
const int itsIndex
 
ObjectitsObject
 
AttributeitsAttr
 

Static Private Attributes

static const std::string typeName
 

Additional Inherited Members

- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (const RCObject &right)
 

Detailed Description

template<class T>
class Expressions::SRefAttr< T >

An attribute defined as a reference to a scalar.

Definition at line 248 of file Expressions.h.

Constructor & Destructor Documentation

template<class T >
Expressions::SRefAttr< T >::SRefAttr ( const std::string &  oName,
const std::string &  aName,
int  index 
)

Constructor.

Definition at line 117 of file SRefAttr.h.

template<class T >
Expressions::SRefAttr< T >::SRefAttr ( const SRefAttr< T > &  rhs)

Definition at line 123 of file SRefAttr.h.

template<class T >
Expressions::SRefAttr< T >::~SRefAttr ( )
virtual

Definition at line 131 of file SRefAttr.h.

template<class T>
Expressions::SRefAttr< T >::SRefAttr ( )
private

Member Function Documentation

template<class T >
SRefAttr< T > * Expressions::SRefAttr< T >::clone ( ) const
virtual

Make clone.

Implements AttributeBase.

Definition at line 138 of file SRefAttr.h.

template<class T >
T Expressions::SRefAttr< T >::evaluate ( ) const
virtual

Evaluate.

Definition at line 144 of file SRefAttr.h.

References T.

Referenced by Attributes::getBool(), Attributes::getReal(), and Attributes::getString().

template<class T >
void Expressions::SRefAttr< T >::fill ( ) const
private

Definition at line 220 of file SRefAttr.h.

References OpalData::find(), and OpalData::getInstance().

Here is the call graph for this function:

template<class T >
double Expressions::SRefAttr< T >::getReal ( )
virtual

Return real value.

Definition at line 176 of file SRefAttr.h.

template<>
double Expressions::SRefAttr< double >::getReal ( )
inline

Definition at line 183 of file SRefAttr.h.

template<class T >
void Expressions::SRefAttr< T >::invalidate ( )
virtual

Invalidate.

Reimplemented from Invalidator.

Definition at line 198 of file SRefAttr.h.

template<class T>
void Expressions::SRefAttr< T >::operator= ( const SRefAttr< T > &  )
private
template<class T >
void Expressions::SRefAttr< T >::print ( std::ostream &  os) const
virtual

Print the reference.

Implements AttributeBase.

Definition at line 189 of file SRefAttr.h.

template<class T >
void Expressions::SRefAttr< T >::set ( const T value) const
virtual

Store new value.

Definition at line 205 of file SRefAttr.h.

Referenced by Attributes::setBool(), Attributes::setReal(), and Attributes::setString().

Member Data Documentation

template<class T>
const std::string Expressions::SRefAttr< T >::att_name
private

Definition at line 96 of file SRefAttr.h.

template<class T>
Attribute* Expressions::SRefAttr< T >::itsAttr
mutableprivate

Definition at line 101 of file SRefAttr.h.

template<class T>
const int Expressions::SRefAttr< T >::itsIndex
private

Definition at line 97 of file SRefAttr.h.

template<class T>
Object* Expressions::SRefAttr< T >::itsObject
mutableprivate

Definition at line 100 of file SRefAttr.h.

template<class T>
const std::string Expressions::SRefAttr< T >::obj_name
private

Definition at line 95 of file SRefAttr.h.

template<class T>
const std::string Expressions::SRefAttr< T >::typeName
staticprivate

Definition at line 92 of file SRefAttr.h.


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