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

A scalar expression with one scalar operand. More...

#include <SUnary.h>

Inheritance diagram for Expressions::SUnary< T, U >:
Inheritance graph
Collaboration diagram for Expressions::SUnary< T, U >:
Collaboration graph

Public Member Functions

 SUnary (const TFunction1< T, U > &function, PtrToScalar< U > operand)
 Constructor.
 
 SUnary (const SUnary< T, U > &)
 
virtual ~SUnary ()
 
virtual Scalar< T > * clone () const
 Make clone.
 
virtual T evaluate () const
 Evaluate.
 
virtual void print (std::ostream &, int precedence=99) const
 Print expression.
 
virtual bool isConstant () const
 Test for constant.
 

Static Public Member Functions

static Scalar< T > * make (const TFunction1< T, U > &function, PtrToScalar< U > operand)
 Make a new expression.
 

Private Member Functions

 SUnary ()
 
void operator= (const SUnary &)
 

Private Attributes

const TFunction1< T, U > & fun
 
PtrToScalar< U > opr
 

Detailed Description

template<class T, class U>
class Expressions::SUnary< T, U >

A scalar expression with one scalar operand.

Definition at line 38 of file SUnary.h.

Constructor & Destructor Documentation

◆ SUnary() [1/3]

template<class T , class U >
Expressions::SUnary< T, U >::SUnary ( const TFunction1< T, U > &  function,
PtrToScalar< U >  operand 
)
inline

Constructor.

Definition at line 82 of file SUnary.h.

◆ SUnary() [2/3]

template<class T , class U >
Expressions::SUnary< T, U >::SUnary ( const SUnary< T, U > &  rhs)
inline

Definition at line 78 of file SUnary.h.

◆ ~SUnary()

template<class T , class U >
Expressions::SUnary< T, U >::~SUnary ( )
inlinevirtual

Definition at line 86 of file SUnary.h.

◆ SUnary() [3/3]

template<class T , class U >
Expressions::SUnary< T, U >::SUnary ( )
private

Member Function Documentation

◆ clone()

template<class T , class U >
Scalar< T > * Expressions::SUnary< T, U >::clone ( ) const
inlinevirtual

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 89 of file SUnary.h.

◆ evaluate()

template<class T , class U >
T Expressions::SUnary< T, U >::evaluate ( ) const
inlinevirtual

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 94 of file SUnary.h.

◆ isConstant()

template<class T >
bool Expressions::Scalar< T >::isConstant ( ) const
inlinevirtualinherited

Test for constant.

Reimplemented in Expressions::SConstant< T >.

Definition at line 287 of file AbstractObjects/Expressions.h.

◆ make()

template<class T , class U >
Scalar< T > * Expressions::SUnary< T, U >::make ( const TFunction1< T, U > &  function,
PtrToScalar< U >  operand 
)
inlinestatic

Make a new expression.

Definition at line 116 of file SUnary.h.

References Expressions::TFunction1< T, U >::precedence, and Expressions::PtrToScalar< T >::release().

Referenced by Expressions::parsePrimary(), and Expressions::parseReal().

Here is the call graph for this function:

◆ operator=()

template<class T , class U >
void Expressions::SUnary< T, U >::operator= ( const SUnary< T, U > &  )
private

◆ print()

template<class T , class U >
void Expressions::SUnary< T, U >::print ( std::ostream &  os,
int  precedence = 99 
) const
inlinevirtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 136 of file SUnary.h.

Member Data Documentation

◆ fun

template<class T , class U >
const TFunction1<T, U>& Expressions::SUnary< T, U >::fun
private

Definition at line 68 of file SUnary.h.

◆ opr

template<class T , class U >
PtrToScalar<U> Expressions::SUnary< T, U >::opr
private

Definition at line 71 of file SUnary.h.


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