logo top
Main Page   Groups   Namespaces  

base.h File Reference


Namespaces

namespace  sigc
namespace  sigc::internal

Classes

struct  sigc::lambda_base
 A hint to the compiler. More...
struct  sigc::internal::lambda_core<T_type, true>
 Abstracts lambda functionality (template specialization for lambda values). More...
struct  sigc::internal::lambda_core<T_type, true>::deduce_result_type<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>
struct  sigc::internal::lambda_core<T_type, false>
 Abstracts lambda functionality (template specialization for other value types). More...
struct  sigc::internal::lambda_core<T_type, false>::deduce_result_type<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>
struct  sigc::lambda<T_type>
 Lambda type. More...
struct  sigc::unwrap_lambda_type<T_type>
 Deduces the type of the object stored in an object of the passed lambda type. More...
struct  sigc::unwrap_lambda_type<lambda<T_type>>

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
 


Generated for libsigc++ 2.0 by Doxygen 1.3.9.1 © 1997-2001