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

Object attribute with a ``deferred'' scalar value. More...

#include <SDeferred.h>

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

Public Member Functions

 SDeferred (PtrToScalar< T > expr)
 Constructor.
 SDeferred (const SDeferred< T > &)
virtual ~SDeferred ()
virtual SDeferred< T > * clone () const
 Make clone.
virtual T evaluate ()
 Evaluate.
virtual bool isExpression () const
 Return expression flag.
virtual void print (std::ostream &) const
 Print the attribute value.
std::string getImage () const
 Convert to string.
int addReference () const
 Increment reference count.
int removeReference () const
 Decrement the reference count.
bool isShared () const
 Test for sharing.
virtual void invalidate ()
 Force re-evaluation.

Protected Attributes

PtrToScalar< T > expr_ptr
 Pointer to expression.
value
 The value of the attribute.

Private Member Functions

 SDeferred ()
void operator= (const SDeferred< T > &)

Private Attributes

bool in_evaluation
int refCount

Detailed Description

template<class T>
class Expressions::SDeferred< T >

Object attribute with a ``deferred'' scalar value.

Definition at line 39 of file SDeferred.h.

Constructor & Destructor Documentation

◆ SDeferred() [1/3]

template<class T>
Expressions::SDeferred< T >::SDeferred ( PtrToScalar< T > expr)
explicit

Constructor.

Definition at line 90 of file SDeferred.h.

References expr_ptr, in_evaluation, and Expressions::SValue< T >::SValue().

Referenced by clone(), operator=(), Expressions::SAutomatic< T >::SAutomatic(), Expressions::SAutomatic< T >::SAutomatic(), and SDeferred().

Here is the call graph for this function:

◆ SDeferred() [2/3]

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

Definition at line 84 of file SDeferred.h.

References clone(), expr_ptr, in_evaluation, SDeferred(), and Expressions::SValue< T >::SValue().

Here is the call graph for this function:

◆ ~SDeferred()

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

Definition at line 96 of file SDeferred.h.

◆ SDeferred() [3/3]

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

Member Function Documentation

◆ addReference()

int RCObject::addReference ( ) const
inlineinherited

Increment reference count.

Definition at line 83 of file RCObject.h.

References refCount.

Referenced by Pointer< Object >::operator=(), Pointer< Object >::operator=(), and Pointer< Object >::unique().

◆ clone()

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

Make clone.

Reimplemented from Expressions::SValue< T >.

Reimplemented in Expressions::SAutomatic< T >.

Definition at line 101 of file SDeferred.h.

References SDeferred().

Referenced by SDeferred().

Here is the call graph for this function:

◆ evaluate()

template<class T>
T Expressions::SDeferred< T >::evaluate ( )
virtual

Evaluate.

Reimplemented from Expressions::SValue< T >.

Reimplemented in Expressions::SAutomatic< T >.

Definition at line 107 of file SDeferred.h.

References expr_ptr, AttributeBase::getImage(), in_evaluation, Expressions::SValue< T >::value, OpalException::what(), and OpalException::where().

Referenced by Expressions::SAutomatic< T >::evaluate().

Here is the call graph for this function:

◆ getImage()

std::string AttributeBase::getImage ( ) const
inherited

Convert to string.

Definition at line 34 of file AttributeBase.cpp.

References print().

Referenced by Expressions::ADeferred< T >::evaluate(), Expressions::SDeferred< T >::evaluate(), and Expressions::SRefAttr< T >::evaluate().

Here is the call graph for this function:

◆ invalidate()

void Invalidator::invalidate ( )
virtualinherited

◆ isExpression()

template<class T>
bool Expressions::SDeferred< T >::isExpression ( ) const
virtual

Return expression flag.

Reimplemented from AttributeBase.

Definition at line 144 of file SDeferred.h.

◆ isShared()

bool RCObject::isShared ( ) const
inlineinherited

Test for sharing.

Definition at line 93 of file RCObject.h.

References refCount.

◆ operator=()

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

References SDeferred().

Here is the call graph for this function:

◆ print()

template<class T>
void Expressions::SDeferred< T >::print ( std::ostream & stream) const
virtual

Print the attribute value.

Reimplemented from Expressions::SValue< T >.

Definition at line 150 of file SDeferred.h.

References expr_ptr.

◆ removeReference()

int RCObject::removeReference ( ) const
inlineinherited

Decrement the reference count.

Definition at line 88 of file RCObject.h.

References refCount.

Member Data Documentation

◆ expr_ptr

template<class T>
PtrToScalar<T> Expressions::SDeferred< T >::expr_ptr
protected

Pointer to expression.

Definition at line 67 of file SDeferred.h.

Referenced by evaluate(), print(), SDeferred(), and SDeferred().

◆ in_evaluation

template<class T>
bool Expressions::SDeferred< T >::in_evaluation
mutableprivate

Definition at line 76 of file SDeferred.h.

Referenced by evaluate(), SDeferred(), and SDeferred().

◆ refCount

int RCObject::refCount
mutableprivateinherited

Definition at line 76 of file RCObject.h.

Referenced by addReference(), isShared(), RCObject(), RCObject(), and removeReference().

◆ value

template<class T>
T Expressions::SValue< T >::value
mutableprotectedinherited

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