OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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 bool isConstant () const
 Test for constant. 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

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.

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

Definition at line 84 of file SUnary.h.

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

Definition at line 98 of file SUnary.h.

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

Member Function Documentation

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

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 103 of file SUnary.h.

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

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 109 of file SUnary.h.

References arg(), and T.

Here is the call graph for this function:

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

References OwnPtr< Scalar< T > >::release().

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

Here is the call graph for this function:

template<class T, class U>
void Expressions::SUnary< T, U >::operator= ( const SUnary< T, U > &  )
private
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

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

Definition at line 73 of file SUnary.h.

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: