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

Object attribute with a constant array value. More...

#include <AValue.h>

Inheritance diagram for Expressions::AValue< T >:
Inheritance graph
Collaboration diagram for Expressions::AValue< T >:
Collaboration graph

Public Member Functions

 AValue ()
 Default constructor. More...
 
 AValue (const std::vector< T > &val)
 Constructor. More...
 
 AValue (const AValue &)
 
virtual ~AValue ()
 
virtual AValueclone () const
 Make clone. More...
 
virtual std::vector< T > evaluate ()
 Evaluate. More...
 
virtual void print (std::ostream &) const
 Print the attribute value. More...
 
void print (std::ostream &os) const
 Print value. More...
 
void print (std::ostream &os) const
 Print value. More...
 
void print (std::ostream &os) const
 Print value. More...
 
void print (std::ostream &os) const
 Print value. More...
 
std::string getImage () const
 Convert to string. More...
 
virtual bool isExpression () const
 Test for expression. More...
 
int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 
virtual void invalidate ()
 Force re-evaluation. More...
 

Protected Attributes

std::vector< T > value
 The value of the attribute. More...
 

Private Member Functions

void operator= (const AValue< T > &)
 

Private Attributes

int refCount
 

Detailed Description

template<class T>
class Expressions::AValue< T >

Object attribute with a constant array value.

Definition at line 35 of file AValue.h.

Constructor & Destructor Documentation

◆ AValue() [1/3]

template<class T >
Expressions::AValue< T >::AValue

Default constructor.

Definition at line 76 of file AValue.h.

◆ AValue() [2/3]

template<class T >
Expressions::AValue< T >::AValue ( const std::vector< T > &  val)
explicit

Constructor.

Definition at line 88 of file AValue.h.

◆ AValue() [3/3]

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

Definition at line 82 of file AValue.h.

◆ ~AValue()

template<class T >
Expressions::AValue< T >::~AValue
virtual

Definition at line 94 of file AValue.h.

Member Function Documentation

◆ addReference()

int RCObject::addReference ( ) const
inlineinherited

Increment reference count.

Definition at line 83 of file RCObject.h.

References RCObject::refCount.

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

◆ clone()

template<class T >
AValue< T > * Expressions::AValue< T >::clone
virtual

Make clone.

Implements AttributeBase.

Reimplemented in Expressions::AAutomatic< T >, and Expressions::ADeferred< T >.

Definition at line 99 of file AValue.h.

◆ evaluate()

template<class T >
std::vector< T > Expressions::AValue< T >::evaluate
virtual

Evaluate.

Reimplemented in Expressions::AAutomatic< T >, and Expressions::ADeferred< T >.

Definition at line 105 of file AValue.h.

◆ getImage()

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

Convert to string.

Definition at line 34 of file AttributeBase.cpp.

References AttributeBase::print().

Referenced by Attribute::getImage().

Here is the call graph for this function:

◆ invalidate()

void Invalidator::invalidate ( )
virtualinherited

◆ isExpression()

bool AttributeBase::isExpression ( ) const
virtualinherited

Test for expression.

Reimplemented in Expressions::ADeferred< T >, and Expressions::SDeferred< T >.

Definition at line 42 of file AttributeBase.cpp.

Referenced by Attribute::isExpression(), and OpalElement::printMultipoleStrength().

◆ isShared()

bool RCObject::isShared ( ) const
inlineinherited

Test for sharing.

Definition at line 93 of file RCObject.h.

References RCObject::refCount.

◆ operator=()

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

◆ print() [1/5]

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

Print the attribute value.

Implements AttributeBase.

Reimplemented in Expressions::ADeferred< T >.

◆ print() [2/5]

void Expressions::AValue< bool >::print ( std::ostream &  ) const
inlinevirtual

Print value.

Implements AttributeBase.

Definition at line 114 of file AValue.h.

◆ print() [3/5]

void Expressions::AValue< double >::print ( std::ostream &  ) const
inlinevirtual

Print value.

Implements AttributeBase.

Definition at line 130 of file AValue.h.

◆ print() [4/5]

void Expressions::AValue< std::string >::print ( std::ostream &  ) const
inlinevirtual

Print value.

Implements AttributeBase.

Definition at line 148 of file AValue.h.

◆ print() [5/5]

void Expressions::AValue< std::list< Token > >::print ( std::ostream &  ) const
inlinevirtual

Print value.

Implements AttributeBase.

Definition at line 164 of file AValue.h.

◆ removeReference()

int RCObject::removeReference ( ) const
inlineinherited

Decrement the reference count.

Definition at line 88 of file RCObject.h.

References RCObject::refCount.

Member Data Documentation

◆ refCount

int RCObject::refCount
mutableprivateinherited

◆ value

template<class T >
std::vector<T> Expressions::AValue< T >::value
mutableprotected

The value of the attribute.

Definition at line 63 of file AValue.h.


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