OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Expressions::SValue< T > Class Template Reference

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

#include <SValue.h>

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

Public Member Functions

 SValue ()
 Default constructor.
 
 SValue (const T &val)
 Constructor.
 
 SValue (const SValue< T > &)
 
virtual ~SValue ()
 
virtual SValue< T > * clone () const
 Make clone.
 
virtual T evaluate ()
 Evaluate.
 
virtual void print (std::ostream &) const
 Print the attribute value.
 
void print (std::ostream &os) const
 Print value.
 
void print (std::ostream &os) const
 Print value.
 
void print (std::ostream &os) const
 Print value.
 
std::string getImage () const
 Convert to string.
 
virtual bool isExpression () const
 Test for expression.
 
virtual void invalidate ()
 Force re-evaluation.
 

Protected Attributes

T value
 The value of the attribute.
 

Private Member Functions

void operator= (const SValue< T > &)
 

Detailed Description

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

Object attribute with a constant scalar value.

Definition at line 34 of file SValue.h.

Constructor & Destructor Documentation

◆ SValue() [1/3]

template<class T >
Expressions::SValue< T >::SValue ( )

Default constructor.

Definition at line 70 of file SValue.h.

◆ SValue() [2/3]

template<class T >
Expressions::SValue< T >::SValue ( const T val)
explicit

Constructor.

Definition at line 76 of file SValue.h.

◆ SValue() [3/3]

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

Definition at line 73 of file SValue.h.

◆ ~SValue()

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

Definition at line 79 of file SValue.h.

Member Function Documentation

◆ clone()

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

Make clone.

Implements AttributeBase.

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

Definition at line 82 of file SValue.h.

◆ evaluate()

◆ getImage()

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

Convert to string.

Definition at line 29 of file AttributeBase.cpp.

References AttributeBase::print().

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 36 of file AttributeBase.cpp.

Referenced by OpalElement::printMultipoleStrength().

◆ operator=()

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

◆ print() [1/4]

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

Print the attribute value.

Implements AttributeBase.

Reimplemented in Expressions::SDeferred< T >.

Definition at line 95 of file SValue.h.

◆ print() [2/4]

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

Print value.

Implements AttributeBase.

Definition at line 101 of file SValue.h.

◆ print() [3/4]

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

Print value.

Implements AttributeBase.

Definition at line 110 of file SValue.h.

◆ print() [4/4]

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

Print value.

Implements AttributeBase.

Definition at line 116 of file SValue.h.

Member Data Documentation

◆ value

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

The value of the attribute.

Definition at line 59 of file SValue.h.


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