Main Page Groups Namespaces

# base.h File Reference

## Namespaces

namespace | sigc
namespace | sigc::internal

## Functions

template<class T_action, class T_functor, bool I_islambda>
void | visit_each (const T_action& _A_action, const internal::lambda_core<T_functor, I_islambda>& _A_target)
template<class T_action, class T_type>
void | visit_each (const T_action& _A_action, const lambda<T_type>& _A_target)
template<class T_type>
lambda<T_type&> | var (T_type& v)
| Converts a reference into a lambda object.
template<class T_type>
lambda<const T_type&> | var (const T_type& v)
| Converts a constant reference into a lambda object.
template<class T_type>
T_type& | unwrap_lambda_value (T_type& a)
| Gets the object stored inside a lambda object.
template<class T_type>
const T_type& | unwrap_lambda_value (const T_type& a)
template<class T_type>
const T_type& | unwrap_lambda_value (const lambda<T_type>& a)

## Function Documentation

template <class T_type>
const T_type& unwrap_lambda_value | ( | const lambda<T_type>& | a | ) |

template <class T_type>
const T_type& unwrap_lambda_value | ( | const T_type& | a | ) |

template <class T_type>
T_type& unwrap_lambda_value | ( | T_type& | a | ) |

| Gets the object stored inside a lambda object. Returns the object passed as argument if it is not of type lambda.

template <class T_type>
lambda<const T_type&> var | ( | const T_type& | v | ) |

| Converts a constant reference into a lambda object.

template <class T_type>
lambda<T_type&> var | ( | T_type& | v | ) |

Converts a reference into a lambda object.

sigc::var creates a 0-ary functor, returning the value of a referenced variable.

Example:

         int main(int argc, char* argv)
         {
           int data;
           sigc::signal<int> readValue;

           readValue.connect(sigc::var(data));

           data = 3;
           std::cout << readValue() << std::endl; //Prints 3.

          data = 5;
          std::cout << readValue() << std::endl; //Prints 5.
         }

template <class T_action, class T_type>
void visit_each | ( | const T_action& | _A_action,
|  | const lambda<T_type>& | _A_target
| ) |

template <class T_action, class T_functor, bool I_islambda>
void visit_each | ( | const T_action& | _A_action,
|  | const internal::lambda_core<T_functor, I_islambda>& | _A_target
| ) |