The base abstract class for CYISignal.
#include <signal/YiSignalBase.h>
Classes | |
struct | SignalObjects |
Public Member Functions | |
virtual bool | IsConnected () const override |
virtual bool | IsConnected (const CYISignalBase &rSignal) const override |
bool | IsConnected (const CYISignalHandler &rSignalHandler) const |
bool | IsConnected (CYISignalConnectionID connectionID) const |
void | Disconnect (CYISignalHandler &rSignalHandler) |
void | Disconnect (CYISignalConnectionID connectionID) |
void | Disconnect (CYISignalBase &rSignal) |
![]() | |
CYISignalHandler () | |
CYISignalHandler (const CYISignalHandler &rSignalHandler) | |
virtual | ~CYISignalHandler () |
CYISignalHandler & | operator= (const CYISignalHandler &rSignalHandler) |
void | MoveToThread (CYIThread *pThread) |
This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More... | |
CYIThreadHandle | GetThreadAffinity () const |
void | SetThreadAffinity (const CYIThreadHandle &rThreadAffinity) |
void | Disconnect (CYISignalBase &rSignal) |
void | DisconnectFromAllSignals () |
![]() | |
Listener () | |
virtual | ~Listener () |
virtual void | OnThreadStarted (CYIThread *) |
virtual void | OnThreadTerminated (CYIThread *) |
virtual void | OnThreadFinished (CYIThread *) |
Protected Member Functions | |
CYISignalBase () | |
CYISignalBase (const CYISignalBase &rSignal) | |
virtual | ~CYISignalBase () |
CYISignalBase & | operator= (const CYISignalBase &rSignal) |
void | RemoveConnection (CYISignalHandler &rSignalHandler, NotifyFlag notifyHandler) |
void | RemoveAllConnections (NotifyFlag notifyHandler) |
void | RegisterToSignalHandler (const CYISignalHandler &rSignalHandler) |
void | UnregisterFromSignalHandler (CYISignalHandler &rSignalHandler) |
void | ExclusiveLock (CYIRecursiveSpinLock &signalMutex) const |
void | ExclusiveLock (const CYISignalHandler &rSignalHandler, CYIRecursiveSpinLock &signalMutex) const |
void | ExclusiveUnlock (CYIRecursiveSpinLock &signalMutex) const |
void | ExclusiveUnlock (const CYISignalHandler &rSignalHandler, CYIRecursiveSpinLock &rSignalMutex) const |
bool | HasConnection (const CYISignalHandler &rSignalHandler) const |
void | CloneConnectionAndConnectTo (CYISignalBase &signal, const CYISignalConnectionWrapper &connection) |
Protected Attributes | |
CYILazy< SignalObjects > | m_signalObjects |
Friends | |
class | CYISignalHandler |
|
protected |
|
protected |
|
protectedvirtual |
|
protected |
void CYISignalBase::Disconnect | ( | CYISignalHandler & | rSignalHandler | ) |
Disconnects every connection between a CYISignal and the given CYISignalHandler. All daisy-chained signals will also be disconnected.
void CYISignalBase::Disconnect | ( | CYISignalConnectionID | connectionID | ) |
Disconnects a single connection identified by connectionID. If no such connection exists, this function has no effect.
void CYISignalBase::Disconnect | ( | CYISignalBase & | rSignal | ) |
Disconnects every daisy-chained connections between this signal and the given signal.
|
protected |
Obtains exclusive lock with this CYISignalBase and every CYISignalHandler found in the connection list. This function will keep trying to acquire the locks until every objects are locked. The purpose of this function is to avoid deadlocks.
|
protected |
Obtains exclusive lock with this CYISignalBase and every CYISignalHandler found in the connection list. This function will keep trying to acquire the locks until every objects are locked. The purpose of this function is to avoid deadlocks.
|
protected |
Unlocks every CYISignalHandler found in the connection and unlocks this CYISignalBase.
|
protected |
Unlocks a specific CYISignalHandler found in the connection list and unlocks this CYISignalBase.
|
protected |
Checks if this instance has a connection to a given CYISignalHandler.
|
overridevirtual |
Checks if at least one connection has been established with any CYISignalHandler (or to any static functions).
Reimplemented from CYISignalHandler.
|
overridevirtual |
Checks if a CYISignal is connected to another via a daisy chain connection.
Example:
Reimplemented from CYISignalHandler.
bool CYISignalBase::IsConnected | ( | const CYISignalHandler & | rSignalHandler | ) | const |
Checks if at least one connection has been established with a given CYISignalHandler.
bool CYISignalBase::IsConnected | ( | CYISignalConnectionID | connectionID | ) | const |
Checks if a connection has been established and is identified by connectionID.
|
protected |
|
protected |
Adds this CYISignalBase instance into the signal list of a CYISignalHandler.
|
protected |
Disconnects every connection from every CYISignalHandler and from every static functions. All daisy-chained signals will also be disconnected.
|
protected |
Disconnects every connection between a CYISignal and the given CYISignalHandler without severing the connection from the CYISignalHandler to this instance.
This function is meant to be used by the CYISignalHandler only, when the connection termination occurs on the CYISignalHandler first.
|
protected |
Removes this CYISignalBase instance from the signal list of an CYISignalHandler.
|
friend |
|
protected |