matador::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)
 
variableoperator= (const variable &x)
 
return_type operator() (const object_holder &optr) const
 

Detailed Description

template<class R>
class matador::variable< R >

Holds the functor to a method.

Template Parameters
RType of the variable

Wrapper class for the concrete variable implementation.

Member Typedef Documentation

◆ return_type

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

Shortcut for return type.

Constructor & Destructor Documentation

◆ variable() [1/2]

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

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

Parameters
implThe concrete variable.

◆ variable() [2/2]

template<class R >
matador::variable< R >::variable ( const variable< R > &  x)
inline

Copies from the given variable.

Parameters
xThe variable to copy from.

Member Function Documentation

◆ operator()()

template<class R >
return_type matador::variable< R >::operator() ( const object_holder optr) const
inline

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

Parameters
optrThe serializable to apply the variable to.
Returns
The value of the variable.

◆ operator=()

template<class R >
variable & matador::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: