OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Expressions::SConstant< T > Class Template Reference

A scalar constant expression. More...

#include <SConstant.h>

Inheritance diagram for Expressions::SConstant< T >:
Inheritance graph
[legend]
Collaboration diagram for Expressions::SConstant< T >:
Collaboration graph
[legend]

Public Member Functions

 SConstant (T value)
 Constructor. More...
 
virtual ~SConstant ()
 
virtual Scalar< T > * clone () const
 Make clone. More...
 
virtual T evaluate () const
 Evaluate. More...
 
virtual bool isConstant () const
 Test for constant. More...
 
virtual void print (std::ostream &str, int precedence) const
 Print expression. More...
 
void print (std::ostream &os, int) const
 Print expression. More...
 
void print (std::ostream &os, int) const
 Print expression. More...
 
void print (std::ostream &os, int) const
 Print expression. More...
 
void print (std::ostream &os, int) const
 Print expression. More...
 
- Public Member Functions inherited from Expressions::Scalar< T >
 Scalar ()
 
 Scalar (const Scalar &)
 
virtual ~Scalar ()
 
virtual Scalar< T > * clone () const =0
 Copy scalar expression. More...
 
virtual T evaluate () const =0
 Evaluate. More...
 
virtual bool isConstant () const
 Test for constant. More...
 
virtual void print (std::ostream &, int precedence=99) const =0
 Print expression. More...
 

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 ( value)
inlineexplicit

Constructor.

Definition at line 73 of file SConstant.h.

◆ ~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

Member Function Documentation

◆ clone()

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

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 84 of file SConstant.h.

◆ evaluate()

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

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 90 of file SConstant.h.

◆ isConstant()

template<class T >
bool Expressions::SConstant< T >::isConstant
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

◆ print() [1/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.

◆ print() [2/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.

◆ print() [3/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.

◆ print() [4/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.

◆ 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 >.

Member Data Documentation

◆ value

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

Definition at line 65 of file SConstant.h.


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