OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Expressions::SRefExpr< T > Class Template Reference

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

#include <SRefExpr.h>

Inheritance diagram for Expressions::SRefExpr< T >:
Collaboration diagram for Expressions::SRefExpr< T >:

Public Member Functions

 SRefExpr (const std::string &objName, const std::string &attName)
 Constructor.
 SRefExpr (const SRefExpr< T > &rhs)
virtual ~SRefExpr ()
virtual Scalar< T > * clone () const
 Make clone.
virtual T evaluate () const
 Evaluate.
virtual void invalidate ()
 Invalidate.
virtual void print (std::ostream &os, int precedence=99) const
 Print expression.
virtual bool isConstant () const
 Test for constant.

Private Member Functions

void operator= (const SRefExpr &)
void fill () const
const std::string getImage () const

Private Attributes

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

Detailed Description

template<class T>
class Expressions::SRefExpr< T >

An expression defined as a reference to a scalar.

Definition at line 41 of file SRefExpr.h.

Constructor & Destructor Documentation

◆ SRefExpr() [1/2]

template<class T>
Expressions::SRefExpr< T >::SRefExpr ( const std::string & objName,
const std::string & attName )

Constructor.

Definition at line 91 of file SRefExpr.h.

References att_name, itsAttr, itsObject, and obj_name.

Referenced by clone(), fill(), operator=(), and SRefExpr().

◆ SRefExpr() [2/2]

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

Definition at line 99 of file SRefExpr.h.

References att_name, itsAttr, itsObject, obj_name, Expressions::Scalar< T >::Scalar(), and SRefExpr().

Here is the call graph for this function:

◆ ~SRefExpr()

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

Definition at line 107 of file SRefExpr.h.

References itsObject.

Member Function Documentation

◆ clone()

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

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 113 of file SRefExpr.h.

References Expressions::Scalar< T >::Scalar(), and SRefExpr().

Here is the call graph for this function:

◆ evaluate()

template<class T>
T Expressions::SRefExpr< T >::evaluate ( ) const
inlinevirtual

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 119 of file SRefExpr.h.

References fill(), getImage(), and itsAttr.

Here is the call graph for this function:

◆ fill()

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

Definition at line 160 of file SRefExpr.h.

References att_name, OpalData::find(), OpalData::getInstance(), itsAttr, itsObject, obj_name, and SRefExpr().

Referenced by evaluate().

Here is the call graph for this function:

◆ getImage()

template<class T>
const std::string Expressions::SRefExpr< T >::getImage ( ) const
private

Definition at line 136 of file SRefExpr.h.

References print().

Referenced by evaluate().

Here is the call graph for this function:

◆ invalidate()

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

Invalidate.

Reimplemented from Invalidator.

Definition at line 145 of file SRefExpr.h.

References itsAttr, and itsObject.

◆ isConstant()

template<class T>
bool Expressions::Scalar< T >::isConstant ( ) const
inlinevirtualinherited

Test for constant.

Reimplemented in Expressions::SConstant< T >.

Definition at line 282 of file AbstractObjects/Expressions.h.

◆ operator=()

template<class T>
void Expressions::SRefExpr< T >::operator= ( const SRefExpr< T > & )
private

References SRefExpr().

Here is the call graph for this function:

◆ print()

template<class T>
void Expressions::SRefExpr< T >::print ( std::ostream & os,
int precedence = 99 ) const
virtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 152 of file SRefExpr.h.

References att_name, and obj_name.

Referenced by getImage().

Member Data Documentation

◆ att_name

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

Definition at line 79 of file SRefExpr.h.

Referenced by fill(), print(), SRefExpr(), and SRefExpr().

◆ itsAttr

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

Definition at line 83 of file SRefExpr.h.

Referenced by evaluate(), fill(), invalidate(), SRefExpr(), and SRefExpr().

◆ itsObject

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

Definition at line 82 of file SRefExpr.h.

Referenced by fill(), invalidate(), SRefExpr(), SRefExpr(), and ~SRefExpr().

◆ obj_name

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

Definition at line 78 of file SRefExpr.h.

Referenced by fill(), print(), SRefExpr(), and SRefExpr().


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