sigc::signal_base Struct Reference
[Signals]
Base class for the sigc::signal# templates. More...
Inherits sigc::trackable.
Inherited by sigc::signal0< T_return, T_accumulator >, sigc::signal1< T_return, T_arg1, T_accumulator >, sigc::signal2< T_return, T_arg1, T_arg2, T_accumulator >, sigc::signal3< T_return, T_arg1, T_arg2, T_arg3, T_accumulator >, sigc::signal4< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator >, sigc::signal5< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator >, sigc::signal6< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator >, sigc::signal7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator >, sigc::signal0< T_return, nil >, sigc::signal0< T_return, T_accumulator >, sigc::signal1< T_return, T_arg1, nil >, sigc::signal1< T_return, T_arg1, T_accumulator >, sigc::signal2< T_return, T_arg1, T_arg2, nil >, sigc::signal2< T_return, T_arg1, T_arg2, T_accumulator >, sigc::signal3< T_return, T_arg1, T_arg2, T_arg3, nil >, sigc::signal3< T_return, T_arg1, T_arg2, T_arg3, T_accumulator >, sigc::signal4< T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil >, sigc::signal4< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator >, sigc::signal5< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil >, sigc::signal5< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator >, sigc::signal6< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil >, sigc::signal6< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator >, sigc::signal7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil >, and sigc::signal7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator >.
Public Types | |
typedef size_t | size_type |
Public Member Functions | |
signal_base (const signal_base& src) | |
signal_base& | operator= (const signal_base& src) |
bool | empty () const |
Returns whether the list of slots is empty. | |
void | clear () |
Empties the list of slots. | |
size_type | size () const |
Returns the number of slots in the list. | |
Package Functions | |
iterator_type | connect (const slot_base& slot_) |
Adds a slot at the end of the list of slots. | |
iterator_type | insert (iterator_type i, const slot_base& slot_) |
Adds a slot at the given position into the list of slots. | |
iterator_type | erase (iterator_type i) |
Removes the slot at the given position from the list of slots. | |
internal::signal_impl* | impl () const |
Returns the signal_impl object encapsulating the list of slots. | |
Package Attributes | |
internal::signal_impl* | impl_ |
The signal_impl object encapsulating the slot list. |
Detailed Description
Base class for the sigc::signal# templates.signal_base integrates most of the interface of the derived sigc::signal# templates. The implementation, however, resides in sigc::internal::signal_impl. A sigc::internal::signal_impl object is dynamically allocated from signal_base when first connecting a slot to the signal. This ensures that empty signals don't waste memory.
Member Function Documentation
iterator_type sigc::signal_base::connect | ( | const slot_base& | slot_ | ) | [package] |
bool sigc::signal_base::empty | ( | ) | const [inline] |
Returns whether the list of slots is empty.
- Returns:
true
if the list of slots is empty.
iterator_type sigc::signal_base::erase | ( | iterator_type | i | ) | [package] |
internal::signal_impl* sigc::signal_base::impl | ( | ) | const [package] |
Returns the signal_impl object encapsulating the list of slots.
- Returns:
- The signal_impl object encapsulating the list of slots.
iterator_type sigc::signal_base::insert | ( | iterator_type | i, | |
const slot_base& | slot_ | |||
) | [package] |
Adds a slot at the given position into the list of slots.
Note that this function does not work during signal emission!
- Parameters:
-
i An iterator indicating the position where slot_ should be inserted. slot_ The slot to add to the list of slots.
- Returns:
- An iterator pointing to the new slot in the list.
size_type sigc::signal_base::size | ( | ) | const |
Returns the number of slots in the list.
- Returns:
- The number of slots in the list.
The documentation for this struct was generated from the following file:
- sigc++/signal_base.h