OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
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
[legend]
Collaboration diagram for Expressions::SUnary< T, U >:
Collaboration graph
[legend]

Public Member Functions

 SUnary (const TFunction1< T, U > &function, PtrToScalar< U > operand)
 Constructor. More...
 
 SUnary (const SUnary< T, U > &)
 
virtual ~SUnary ()
 
virtual Scalar< T > * clone () const
 Make clone. More...
 
virtual T evaluate () const
 Evaluate. More...
 
virtual void print (std::ostream &, int precedence=99) 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...
 

Static Public Member Functions

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

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 39 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 91 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 84 of file SUnary.h.

◆ ~SUnary()

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

Definition at line 98 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
inlinevirtual

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 103 of file SUnary.h.

◆ evaluate()

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

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 109 of file SUnary.h.

References arg(), and Attrib::Legacy::Distribution::T.

Here is the call graph for this function:

◆ 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 134 of file SUnary.h.

References PyOpal::PyPolynomialPatch::function(), and OwnPtr< Object >::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 155 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 73 of file SUnary.h.

◆ opr

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

Definition at line 76 of file SUnary.h.


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