OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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...
 
template<>
void print (std::ostream &os, int) const
 Print expression. More...
 
template<>
void print (std::ostream &os, int) const
 Print expression. More...
 
template<>
void print (std::ostream &os, int) const
 Print expression. More...
 
template<>
void print (std::ostream &os, int) const
 Print expression. More...
 
- Public Member Functions inherited from Expressions::Scalar< T >
 Scalar ()
 
 Scalar (const Scalar &)
 
virtual ~Scalar ()
 

Private Member Functions

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

Private Attributes

T 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

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

Constructor.

Definition at line 73 of file SConstant.h.

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

Definition at line 79 of file SConstant.h.

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

Member Function Documentation

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.

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

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 90 of file SConstant.h.

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.

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

Print expression.

Implements Expressions::Scalar< T >.

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

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

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

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

Member Data Documentation

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: