MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Global signal helpful for distribution of global events within an application. More...
#include <mdsGlobalSignal.h>
Public Types | |
enum | { CLASS_SINGLETON } |
Templates that require members of the CSingleton class can use this enum to check the existence. More... | |
enum | { LONGEVITY = L } |
Object longevity. More... | |
enum | { ID = Id } |
Signal identification. More... | |
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. | |
typedef CSignal< R, P1, P2, P3, P4 > | tSignal |
Encapsulated signal. | |
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. | |
void | disconnect (tSignalConnection &sc) |
Unregisters an existing signal handler. | |
void | disconnectAll () |
Unregisters all existing signal handlers. | |
int | getId () const |
Returns global signal identifier. | |
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 (CGlobalSignal) | |
Smart pointer type. | |
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. | |
~CGlobalSignal () | |
Destructor. | |
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. |
Global signal helpful for distribution of global events within an application.
typedef CSignalConnection::tConnectionId mds::mod::CSignal< R, P1, P2, P3, P4 >::tConnectionId [protected, inherited] |
Connection identifier.
typedef mds::base::CFunctor<R, P1, P2, P3, P4> mds::mod::CSignal< R, P1, P2, P3, P4 >::tHandler [inherited] |
Handler type.
typedef std::map<tConnectionId, SHandlerInfo> mds::mod::CSignal< R, P1, P2, P3, P4 >::tHandlers [protected, inherited] |
Map of registered signal handlers.
typedef mds::base::CLibraryLockableObject<CSignal>::CLock mds::mod::CSignal< R, P1, P2, P3, P4 >::tLock [inherited] |
Lock that may be used to provide mutual access.
typedef tHandler::tParam1 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam1 [inherited] |
typedef tHandler::tParam2 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam2 [inherited] |
typedef tHandler::tParam3 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam3 [inherited] |
typedef tHandler::tParam4 mds::mod::CSignal< R, P1, P2, P3, P4 >::tParam4 [inherited] |
typedef tHandler::tResult mds::mod::CSignal< R, P1, P2, P3, P4 >::tResult [inherited] |
Handler parameters.
typedef CSignal<R, P1, P2, P3, P4> mds::mod::CGlobalSignal< Id, R, P1, P2, P3, P4 >::tSignal |
Encapsulated signal.
anonymous enum [inherited] |
Templates that require members of the CSingleton class can use this enum to check the existence.
anonymous enum |
anonymous enum [inherited] |
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
mds::mod::CGlobalSignal< Id, R, P1, P2, P3, P4 >::~CGlobalSignal | ( | ) |
Destructor.
void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
void CSignal::block | ( | tSignalConnection & | sc | ) | [inherited] |
Blocks a given signal handler.
void CSignal::blockAllButThis | ( | tSignalConnection & | sc | ) | [inherited] |
Blocks all others signal handlers.
tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | F | Func | ) | [inherited] |
tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | const O & | pObject, |
F | pMemFunc | ||
) | [inherited] |
tSignalConnection CSignal::connect | ( | const tHandler & | handler | ) | [inherited] |
Registers a new signal handler.
tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | F | Func | ) | [inherited] |
Registers a new signal handler.
tSignalConnection mds::mod::CSignal< R, P1, P2, P3, P4 >::connect | ( | const O & | pObject, |
F | pMemFunc | ||
) | [inherited] |
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 | ) | [inherited] |
Unregisters an existing signal handler.
void CSignal::disconnectAll | ( | ) | [inherited] |
Unregisters all existing signal handlers.
int mds::mod::CGlobalSignal< Id, R, P1, P2, P3, P4 >::getId | ( | ) | const |
Returns global signal identifier.
int mds::mod::CSignal< R, P1, P2, P3, P4 >::getNumOfConnections | ( | ) | [inherited] |
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, inherited] |
Creates a new unique connection number.
void CSignal::invoke | ( | ) | [inherited] |
Invokes the signal.
void CSignal::invoke | ( | tParam1 | p1 | ) | [inherited] |
void CSignal::invoke | ( | tParam1 | p1, |
tParam2 | p2 | ||
) | [inherited] |
void CSignal::invoke | ( | tParam1 | p1, |
tParam2 | p2, | ||
tParam3 | p3 | ||
) | [inherited] |
void CSignal::invoke | ( | tParam1 | p1, |
tParam2 | p2, | ||
tParam3 | p3, | ||
tParam4 | p4 | ||
) | [inherited] |
CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | ) | [inherited] |
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 | ) | [inherited] |
CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1, |
tParam2 | p2 | ||
) | [inherited] |
CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1, |
tParam2 | p2, | ||
tParam3 | p3 | ||
) | [inherited] |
CSignal< R, P1, P2, P3, P4 >::tResult CSignal::invoke2 | ( | tParam1 | p1, |
tParam2 | p2, | ||
tParam3 | p3, | ||
tParam4 | p4 | ||
) | [inherited] |
bool CSignal::isBlocked | ( | tSignalConnection & | sc | ) | [inherited] |
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::CGlobalSignal< Id, R, P1, P2, P3, P4 >::MDS_SHAREDPTR | ( | CGlobalSignal< Id, R, P1, P2, P3, P4 > | ) |
Smart pointer type.
mds::mod::CSignal< R, P1, P2, P3, P4 >::MDS_SHAREDPTR | ( | CSignal< R, P1, P2, P3, P4 > | ) | [inherited] |
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 | ) | [inherited] |
Unblocks a given signal handler.
void CSignal::unblockAll | ( | ) | [inherited] |
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, inherited] |
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, inherited] |
Next free connection identifier.