plll  1.0
plll::arithmetic::expressions::Wrapper< Context_ > Class Template Reference

Wraps a variable to behave similarly to an Expression<> object. More...

#include <arithmetic-expressions.hpp>

Public Member Functions

void assignTo (typename Context_::Type &x) const
 Assigns the value to the destination variable. More...
 
const Context_::Type & evaluate () const
 "Evaluates" (returns) the stored value. More...
 
 operator const typename Context_::Type & () const
 Cast operator. More...
 
unsigned long precision () const
 Returns the precision of the variable. More...
 
 Wrapper (const typename Context_::Type &value)
 Initializes the wrapper object with the given variable.
 

Detailed Description

template<typename Context_>
class plll::arithmetic::expressions::Wrapper< Context_ >

Wraps a variable to behave similarly to an Expression<> object.

The wrapper object stores a reference to the original variable.

Definition at line 71 of file arithmetic-expressions.hpp.

Member Function Documentation

template<typename Context_ >
void plll::arithmetic::expressions::Wrapper< Context_ >::assignTo ( typename Context_::Type &  x) const
inline

Assigns the value to the destination variable.

Parameters
xThe varible where to store the value.

Definition at line 114 of file arithmetic-expressions.hpp.

template<typename Context_ >
const Context_::Type& plll::arithmetic::expressions::Wrapper< Context_ >::evaluate ( ) const
inline

"Evaluates" (returns) the stored value.

Returns
a const reference to the the stored value.

Definition at line 124 of file arithmetic-expressions.hpp.

template<typename Context_ >
plll::arithmetic::expressions::Wrapper< Context_ >::operator const typename Context_::Type & ( ) const
inline

Cast operator.

Returns
a const reference to the the stored value.

Definition at line 104 of file arithmetic-expressions.hpp.

template<typename Context_ >
unsigned long plll::arithmetic::expressions::Wrapper< Context_ >::precision ( ) const
inline

Returns the precision of the variable.

Only available for real types.

Definition at line 94 of file arithmetic-expressions.hpp.


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