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

A scalar constant expression. More...

#include <SConstant.h>

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

Public Member Functions

 SConstant (T value)
 Constructor.
virtual ~SConstant ()
virtual Scalar< T > * clone () const
 Make clone.
virtual T evaluate () const
 Evaluate.
virtual bool isConstant () const
 Test for constant.
virtual void print (std::ostream &str, int precedence) const
 Print expression.
void print (std::ostream &os, int) const
 Print expression.
void print (std::ostream &os, int) const
 Print expression.
void print (std::ostream &os, int) const
 Print expression.
void print (std::ostream &os, int) const
 Print expression.

Private Member Functions

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

Private Attributes

value

Detailed Description

template<class T>
class Expressions::SConstant< T >

A scalar constant expression.

Definition at line 35 of file SConstant.h.

Constructor & Destructor Documentation

◆ SConstant() [1/3]

template<class T>
Expressions::SConstant< T >::SConstant ( T value)
inlineexplicit

Constructor.

Definition at line 73 of file SConstant.h.

References value.

Referenced by clone(), operator=(), print(), and SConstant().

◆ ~SConstant()

template<class T>
Expressions::SConstant< T >::~SConstant ( )
inlinevirtual

Definition at line 79 of file SConstant.h.

◆ SConstant() [2/3]

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

◆ SConstant() [3/3]

template<class T>
Expressions::SConstant< T >::SConstant ( const SConstant< T > & )
private

References SConstant().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

template<class T>
Scalar< T > * Expressions::SConstant< T >::clone ( ) const
inlinevirtual

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 84 of file SConstant.h.

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

Here is the call graph for this function:

◆ evaluate()

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

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 90 of file SConstant.h.

References value.

◆ isConstant()

template<class T>
bool Expressions::SConstant< T >::isConstant ( ) const
inlinevirtual

Test for constant.

Reimplemented from Expressions::Scalar< T >.

Definition at line 96 of file SConstant.h.

◆ operator=()

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

References SConstant().

Here is the call graph for this function:

◆ print() [1/5]

void Expressions::SConstant< std::list< Token > >::print ( std::ostream & ,
int precedence ) const
inlinevirtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 125 of file SConstant.h.

References print(), SConstant(), and value.

Here is the call graph for this function:

◆ print() [2/5]

void Expressions::SConstant< std::string >::print ( std::ostream & ,
int precedence ) const
inlinevirtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 119 of file SConstant.h.

References value.

◆ print() [3/5]

void Expressions::SConstant< double >::print ( std::ostream & ,
int precedence ) const
inlinevirtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 111 of file SConstant.h.

References value.

◆ print() [4/5]

void Expressions::SConstant< bool >::print ( std::ostream & ,
int precedence ) const
inlinevirtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 105 of file SConstant.h.

References value.

◆ print() [5/5]

template<class T>
virtual void Expressions::SConstant< T >::print ( std::ostream & str,
int precedence ) const
virtual

Print expression.

Implements Expressions::Scalar< T >.

Referenced by print().

Member Data Documentation

◆ value

template<class T>
T Expressions::SConstant< T >::value
private

Definition at line 65 of file SConstant.h.

Referenced by clone(), evaluate(), print(), and SConstant().


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