logo top
Main Page   Groups   Namespaces  

Signals

Use sigc::signal::connect() with sigc::mem_fun() and sigc::ptr_fun() to connect a method or function with a signal. More...

Compounds

struct  connection
 Convinience class for safe disconnection. More...

class  signal
 Convenience wrapper for the numbered sigc::signal# templates. More...

class  signal0
 Signal declaration. More...

class  signal1
 Signal declaration. More...

class  signal2
 Signal declaration. More...

class  signal3
 Signal declaration. More...

class  signal4
 Signal declaration. More...

class  signal5
 Signal declaration. More...

class  signal6
 Signal declaration. More...

class  signal7
 Signal declaration. More...

class  signal.accumulated
 Convenience wrapper for the numbered sigc::signal# templates. More...

struct  signal_base
 Base class for the sigc::signal# templates. More...

struct  slot_const_iterator
 STL-style const iterator for slot_list. More...

struct  slot_iterator
 STL-style iterator for slot_list. More...

struct  slot_list
 STL-style list interface for sigc::signal#. More...

struct  trackable
 Base class for objects with auto-disconnection. More...


Detailed Description

Use sigc::signal::connect() with sigc::mem_fun() and sigc::ptr_fun() to connect a method or function with a signal.

 signal_clicked.connect( sigc::mem_fun(*this, &MyWindow::on_clicked) );

When the signal is emitted your method will be called.

signal::connect() returns a connection, which you can later use to disconnect your method. If the type of your object inherits from sigc::trackable the method is disconnected automatically when your object is destroyed.

When signals are copied they share the underlying information, so you can have a protected/private sigc::signal member and a public accessor method.

signal and slot objects provide the core functionality of this library. A slot is a container for an arbitrary functor. A signal is a list of slots that are executed on emission. For compile time type safety a list of template arguments must be provided for the signal template that determines the parameter list for emission. Functors and closures are converted into slots implicitely on connection, triggering compiler errors if the given functor or closure cannot be invoked with the parameter list of the signal to connect to.


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