A class used for tracking EmitterArg and SafeEmitterArg connections.
More...
#include <c++-gtk-utils/emitter.h>
A class used for tracking EmitterArg and SafeEmitterArg connections.
- See also
- EmitterArg SafeEmitterArg
-
emitter.h
-
Callback namespace
This class provides tracking of EmitterArg and SafeEmitterArg connections. It should be a public member of any target class which wants functors representing any of its methods to be disconnected automatically from an EmitterArg or SafeEmitterArg object when the target class object is destroyed, and is passed as one of the arguments to the connect() method of EmitterArg or SafeEmitterArg.
All its methods are thread-safe.
For further background, read this: emitter.h
◆ Releaser() [1/2]
Cgu::Releaser::Releaser |
( |
const Releaser & |
r | ) |
|
|
inline |
This does not copy anything from the Releaser object passed as an argument - see the notes on assignment for an explanation of why. This does not throw.
- Parameters
-
- Exceptions
-
std::bad_alloc | This constructor might throw std::bad_alloc if memory is exhausted and the system throws in that case. |
Thread::MutexError | This constructor might throw Thread::MutexError if initialisation of the contained mutex fails. (It is often not worth checking for this, as it means either memory is exhausted or pthread has run out of other resources to create new mutexes.) |
◆ Releaser() [2/2]
Cgu::Releaser::Releaser |
( |
| ) |
|
|
inline |
- Exceptions
-
std::bad_alloc | The default constructor might throw std::bad_alloc if memory is exhausted and the system throws in that case. |
Thread::MutexError | The default constructor might throw Thread::MutexError if initialisation of the contained mutex fails. (It is often not worth checking for this, as it means either memory is exhausted or pthread has run out of other resources to create new mutexes.) |
◆ ~Releaser()
Cgu::Releaser::~Releaser |
( |
| ) |
|
The destructor does not throw provided that the destructors of any bound arguments of a functor managed by this Releaser object do not throw (as they should not do), and assuming that merely iterating through a list does not throw (as it would not on any sane implementation).
◆ operator=()
See notes on assignment to see how this operates. This does not throw provided that the destructors of any bound arguments of a functor managed by this Releaser object prior to assignment do not throw (as they should not do), and assuming that merely iterating through a list does not throw (as it would not on any sane implementation).
- Parameters
-
◆ EmitterArg
◆ SafeEmitterArg
The documentation for this class was generated from the following file: