![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class provides simple communication and data transfer mechanism between different classes. More...
#include <mdsSignal.h>

Classes | |
| struct | SHandlerInfo |
| Helper structure containing info about signal handler. More... | |
Public Types | |
| enum | { NUM_OF_PARAMS = tHandler::NUM_OF_PARAMS } |
| Number of handler parameters. More... | |
| enum | { CLASS_OBJECT } |
| Templates that require members of the CObject class can use this enum to check the existence. More... | |
| enum | { HEAP_OBJECT = 0x70616568 } |
| Signature used to recognize objects on the heap. More... | |
| typedef mds::base::CFunctor< R, P1, P2, P3, P4 > | tHandler |
| Handler type. | |
| typedef mds::base::CLibraryLockableObject < CSignal >::CLock | tLock |
| Lock that may be used to provide mutual access. | |
| typedef tHandler::tParam1 | tParam1 |
| typedef tHandler::tParam2 | tParam2 |
| typedef tHandler::tParam3 | tParam3 |
| typedef tHandler::tParam4 | tParam4 |
| typedef tHandler::tResult | tResult |
| Handler parameters. | |
Public Member Functions | |
| void | block (tSignalConnection &sc) |
| Blocks a given signal handler. | |
| void | blockAllButThis (tSignalConnection &sc) |
| Blocks all others signal handlers. | |
| template<typename F > | |
| tSignalConnection | connect (F Func) |
| template<class O , typename F > | |
| tSignalConnection | connect (const O &pObject, F pMemFunc) |
| tSignalConnection | connect (const tHandler &handler) |
| Registers a new signal handler. | |
| template<typename F > | |
| tSignalConnection | connect (F Func) |
| Registers a new signal handler. | |
| template<class O , typename F > | |
| tSignalConnection | connect (const O &pObject, F pMemFunc) |
| Constructor creates functor encapsulating pointer to member function. | |
| CSignal () | |
| Default constructor. | |
| void | disconnect (tSignalConnection &sc) |
| Unregisters an existing signal handler. | |
| void | disconnectAll () |
| Unregisters all existing signal handlers. | |
| int | getNumOfConnections () |
| Returns the number of registered handlers. | |
| int | getReferencesCount () const |
| Returns the number of references. | |
| void | invoke () |
| Invokes the signal. | |
| void | invoke (tParam1 p1) |
| void | invoke (tParam1 p1, tParam2 p2) |
| void | invoke (tParam1 p1, tParam2 p2, tParam3 p3) |
| void | invoke (tParam1 p1, tParam2 p2, tParam3 p3, tParam4 p4) |
| tResult | invoke2 () |
| Invokes the signal and returns value obtained by combining all values returned by individual handlers. | |
| tResult | invoke2 (tParam1 p1) |
| tResult | invoke2 (tParam1 p1, tParam2 p2) |
| tResult | invoke2 (tParam1 p1, tParam2 p2, tParam3 p3) |
| tResult | invoke2 (tParam1 p1, tParam2 p2, tParam3 p3, tParam4 p4) |
| bool | isBlocked (tSignalConnection &sc) |
| Returns true if a given signal is blocked. | |
| bool | isOnHeap () const |
| Returns true if the object is allocated on the heap. | |
| void | lock () |
| Locks the object. | |
| MDS_SHAREDPTR (CSignal) | |
| Smart pointer type. | |
| void | unblock (tSignalConnection &sc) |
| Unblocks a given signal handler. | |
| void | unblockAll () |
| Unblocks all signal handlers. | |
| void | unlock () |
| Locks the object. | |
| ~CSignal () | |
| Destructor of the class. | |
Static Public Member Functions | |
| static void * | operator new (std::size_t Size) |
| Allocates a new object on the heap. | |
Protected Types | |
| typedef CSignalConnection::tConnectionId | tConnectionId |
| Connection identifier. | |
| typedef std::map < tConnectionId, SHandlerInfo > | tHandlers |
| Map of registered signal handlers. | |
Protected Member Functions | |
| void | addReference () const |
| Increase the reference counter. | |
| bool | delReference () const |
| Decrease the reference counter. | |
| tConnectionId | getUniqueId () |
| Creates a new unique connection number. | |
Protected Attributes | |
| tHandlers | m_Handlers |
| All registered signal handlers. | |
| int | m_iHeapObject |
| Flag initialized if the object is on the heap. | |
| int | m_iReferences |
| The number of references to the object. | |
| tConnectionId | m_NextId |
| Next free connection identifier. | |
Class provides simple communication and data transfer mechanism between different classes.
It encapsulates a group of registered handlers, which are invoked when the signal is sent.
typedef CSignalConnection::tConnectionId mds::mod::CSignal< R, P1, P2, P3, P4 >::tConnectionId [protected] |
Connection identifier.
| typedef mds::base::CFunctor<R, P1, P2, P3, P4> mds::mod::CSignal< R, P1, P2, P3, P4 >::tHandler |
Handler type.
typedef std::map<tConnectionId, SHandlerInfo> mds::mod::CSignal< R, P1, P2, P3, P4 >::tHandlers [protected] |
Map of registered signal handlers.
| typedef mds::base::CLibraryLockableObject<CSignal>::CLock mds::mod::CSignal< R, P1, P2, P3, P4 >::tLock |
Lock that may be used to provide mutual access.
| typedef tHandler::tParam1 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam1 |
| typedef tHandler::tParam2 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam2 |
| typedef tHandler::tParam3 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam3 |
| typedef tHandler::tParam4 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam4 |
| typedef tHandler::tResult mds::mod::CSignal< R, P1, P2, P3, P4 >::tResult |
Handler parameters.
| anonymous enum |
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
| mds::mod::CSignal< R, P1, P2, P3, P4 >::CSignal | ( | ) |
Default constructor.
| mds::mod::CSignal< R, P1, P2, P3, P4 >::~CSignal | ( | ) |
Destructor of the class.
| void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
| void CSignal::block | ( | tSignalConnection & | sc | ) |
Blocks a given signal handler.
| void CSignal::blockAllButThis | ( | tSignalConnection & | sc | ) |
Blocks all others signal handlers.
| tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | F | Func | ) |
| tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | const O & | pObject, |
| F | pMemFunc | ||
| ) |
| tSignalConnection CSignal::connect | ( | const tHandler & | handler | ) |
Registers a new signal handler.
| tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | F | Func | ) |
Registers a new signal handler.
| tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | const O & | pObject, |
| F | pMemFunc | ||
| ) |
Constructor creates functor encapsulating pointer to member function.
| bool mds::base::CObject::delReference | ( | ) | const [protected, inherited] |
Decrease the reference counter.
| void CSignal::disconnect | ( | tSignalConnection & | sc | ) |
Unregisters an existing signal handler.
| void CSignal::disconnectAll | ( | ) |
Unregisters all existing signal handlers.
| int mds::mod::CSignal< R, P1, P2, P3, P4 >::getNumOfConnections | ( | ) |
Returns the number of registered handlers.
| int mds::base::CObject::getReferencesCount | ( | ) | const [inherited] |
Returns the number of references.
| tConnectionId mds::mod::CSignal< R, P1, P2, P3, P4 >::getUniqueId | ( | ) | [protected] |
Creates a new unique connection number.
| void CSignal::invoke | ( | ) |
Invokes the signal.
| void CSignal::invoke | ( | tParam1 | p1 | ) |
| void CSignal::invoke | ( | tParam1 | p1, |
| tParam2 | p2 | ||
| ) |
| void CSignal::invoke | ( | tParam1 | p1, |
| tParam2 | p2, | ||
| tParam3 | p3 | ||
| ) |
| void CSignal::invoke | ( | tParam1 | p1, |
| tParam2 | p2, | ||
| tParam3 | p3, | ||
| tParam4 | p4 | ||
| ) |
| CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | ) |
Invokes the signal and returns value obtained by combining all values returned by individual handlers.
| CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1 | ) |
| CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1, |
| tParam2 | p2 | ||
| ) |
| CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1, |
| tParam2 | p2, | ||
| tParam3 | p3 | ||
| ) |
| CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1, |
| tParam2 | p2, | ||
| tParam3 | p3, | ||
| tParam4 | p4 | ||
| ) |
| bool CSignal::isBlocked | ( | tSignalConnection & | sc | ) |
Returns true if a given signal is blocked.
| bool mds::base::CObject::isOnHeap | ( | ) | const [inherited] |
Returns true if the object is allocated on the heap.
| void mds::base::CLockableObject< CSignal< R, P1, P2, P3, P4 > >::lock | ( | ) | [inherited] |
Locks the object.
| mds::mod::CSignal< R, P1, P2, P3, P4 >::MDS_SHAREDPTR | ( | CSignal< R, P1, P2, P3, P4 > | ) |
Smart pointer type.
| static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static, inherited] |
Allocates a new object on the heap.
| void CSignal::unblock | ( | tSignalConnection & | sc | ) |
Unblocks a given signal handler.
| void CSignal::unblockAll | ( | ) |
Unblocks all signal handlers.
| void mds::base::CLockableObject< CSignal< R, P1, P2, P3, P4 > >::unlock | ( | ) | [inherited] |
Locks the object.
tHandlers mds::mod::CSignal< R, P1, P2, P3, P4 >::m_Handlers [protected] |
All registered signal handlers.
int mds::base::CObject::m_iHeapObject [mutable, protected, inherited] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected, inherited] |
The number of references to the object.
tConnectionId mds::mod::CSignal< R, P1, P2, P3, P4 >::m_NextId [protected] |
Next free connection identifier.
1.7.6.1