oos::variable< R > Class Template Reference

Holds the functor to a method. More...

#include <object_expression.hpp>

Public Types

typedef R return_type
 

Public Member Functions

 variable (variable_impl< R > *impl)
 
 variable (const variable &x)
 
variable & operator= (const variable &x)
 
return_type operator() (const object_base_ptr &optr) const
 

Detailed Description

template<class R>
class oos::variable< R >

Holds the functor to a method.

Template Parameters
RType of the variable

Wrapper class for the concrete variable implementation.

Member Typedef Documentation

template<class R>
typedef R oos::variable< R >::return_type

Shortcut for return type.

Constructor & Destructor Documentation

template<class R>
oos::variable< R >::variable ( variable_impl< R > *  impl)
inlineexplicit

Initializes a variable with a pointer to a concrete variable implemnation.

Parameters
implThe concrete variable.
template<class R>
oos::variable< R >::variable ( const variable< R > &  x)
inline

Copies from the given variable.

Parameters
xThe variable to copy from.

Member Function Documentation

template<class R>
return_type oos::variable< R >::operator() ( const object_base_ptr &  optr) const
inline

Applies the () operator of the concrete variable and returns the result.

Parameters
optrThe object to apply the variable to.
Returns
The value of the variable.
template<class R>
variable& oos::variable< R >::operator= ( const variable< R > &  x)
inline

Assigns from the given variable.

Parameters
xThe variable to assign from.
Returns
Initialized variable.

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