#include <freControllerEvents.h>


Public Types | |
| typedef long | StatusID |
| typedef void(* | ProgEvent )(const IDPath &senderID, const StatusID status, const std::string &sComment, SessionComponentCache *pSender, long threadID) |
| typedef ProgressCtrlEventBase | Self |
| typedef itk::SmartPointer < Self > | Pointer |
Public Member Functions | |
| freNewEventBaseMacro (ProgressCtrlEventBase, ProgEvent) | |
| virtual const char * | GetNameOfClass () const |
| void | SetACR (SessionComponentCache *pCache) |
| SessionComponentCache * | GetACR () |
| bool | IsLegalSender (SessionComponentCache *pSender) |
| virtual void | Execute (const IDPath &senderID, const StatusID status, const std::string &sComment, SessionComponentCache *pSender, long threadID=0) |
Protected Member Functions | |
| ProgressCtrlEventBase (ProgEvent pPE) | |
| ProgressCtrlEventBase () | |
Protected Attributes | |
| itk::SimpleMutexLock | m_ExecutionMutex |
Private Member Functions | |
| ProgressCtrlEventBase (const Self &) | |
| void | operator= (const Self &) |
Private Attributes | |
| ProgEvent | m_ProgressEvent |
| SessionComponentCache * | m_ACR |
| itk::SimpleMutexLock | m_ACRMutex |
ProgressCtrlEventBase is the generic event object within f.r.e.e. and used for realize callbacks to nonstatic member functions of f.r.e.e. Objects. For an event an authorised cache root (ACR) can be defined. This ACR is the root cache of a session and always unique. An event will only be executed, if event and sender have the same ACR. By this way the event can be limited to a special sessions. If the ACR is null every sender may pass.
Definition at line 125 of file freControllerEvents.h.
| typedef long FREE::ProgressCtrlEventBase::StatusID |
Definition at line 128 of file freControllerEvents.h.
| typedef void(* FREE::ProgressCtrlEventBase::ProgEvent)(const IDPath &senderID, const StatusID status, const std::string &sComment, SessionComponentCache *pSender, long threadID) |
Reimplemented in FREE::ProgressCtrlEvent< T >.
Definition at line 129 of file freControllerEvents.h.
Reimplemented in FREE::ProgressCtrlEvent< T >.
Definition at line 135 of file freControllerEvents.h.
| typedef itk::SmartPointer<Self> FREE::ProgressCtrlEventBase::Pointer |
Reimplemented from FREE::NotificationEventBase.
Reimplemented in FREE::ProgressCtrlEvent< T >.
Definition at line 136 of file freControllerEvents.h.
| FREE::ProgressCtrlEventBase::ProgressCtrlEventBase | ( | const Self & | ) | [private] |
| FREE::ProgressCtrlEventBase::ProgressCtrlEventBase | ( | ProgEvent | pPE | ) | [protected] |
Implementation of FREE::ProgressCtrlEventBase //////////////////////
Definition at line 110 of file freControllerEvents.cxx.
References m_ACR, and m_ProgressEvent.
| FREE::ProgressCtrlEventBase::ProgressCtrlEventBase | ( | ) | [protected] |
| FREE::ProgressCtrlEventBase::freNewEventBaseMacro | ( | ProgressCtrlEventBase | , | |
| ProgEvent | ||||
| ) |
| virtual const char* FREE::ProgressCtrlEventBase::GetNameOfClass | ( | ) | const [inline, virtual] |
Reimplemented from FREE::NotificationEventBase.
Reimplemented in FREE::ProgressCtrlEvent< T >.
Definition at line 139 of file freControllerEvents.h.
| void FREE::ProgressCtrlEventBase::SetACR | ( | SessionComponentCache * | pCache | ) |
Sets the ACR for the event. You may use any cache of the session because the function will call pCache->GetRootCache(). If the passed cache pointer is NULL, the event is set to no limitation.
Definition at line 141 of file freControllerEvents.cxx.
References FREE::SessionComponentCache::GetRootCache(), and m_ACR.

| SessionComponentCache * FREE::ProgressCtrlEventBase::GetACR | ( | ) |
Returns the pointer to the ACR if set.
Definition at line 155 of file freControllerEvents.cxx.
References m_ACR.
| bool FREE::ProgressCtrlEventBase::IsLegalSender | ( | SessionComponentCache * | pSender | ) |
Returns if the passed cache may execute the event. If return is false the execution will be blocked.
Definition at line 162 of file freControllerEvents.cxx.
References FREE::SessionComponentCache::GetRootCache(), m_ACR, and m_ACRMutex.

| void FREE::ProgressCtrlEventBase::operator= | ( | const Self & | ) | [private] |
Reimplemented in FREE::ProgressCtrlEvent< T >.
| void FREE::ProgressCtrlEventBase::Execute | ( | const IDPath & | senderID, | |
| const StatusID | status, | |||
| const std::string & | sComment, | |||
| SessionComponentCache * | pSender, | |||
| long | threadID = 0 | |||
| ) | [virtual] |
Event type that is used, if an iteration is finished. The current values and position of the optimizer are passed with the event. pSender is the pointer to the object how called the event.
| [in] | senderID | IDPath of the component that notifies a progress. |
| [in] | status | ID of the current status of progress. |
| [in] | sComment | String for adding any comments concerning the new status. |
| [in,out] | pSender | Pointer to the session component cache that was active when the event was executed. |
| [in] | threadID | ID of the Thread executing the event. By default this value is 0. This ID is not unique over the complete system, it should only be assumed that it is unique in the context of the sender. |
Definition at line 125 of file freControllerEvents.cxx.
References m_ExecutionMutex, and m_ProgressEvent.
Reimplemented in FREE::ProgressCtrlEvent< T >.
Definition at line 154 of file freControllerEvents.h.
Referenced by Execute(), and ProgressCtrlEventBase().
Definition at line 155 of file freControllerEvents.h.
Referenced by GetACR(), IsLegalSender(), ProgressCtrlEventBase(), and SetACR().
itk::SimpleMutexLock FREE::ProgressCtrlEventBase::m_ACRMutex [private] |
itk::SimpleMutexLock FREE::ProgressCtrlEventBase::m_ExecutionMutex [protected] |
Definition at line 166 of file freControllerEvents.h.
Referenced by FREE::ProgressCtrlEvent< T >::Execute(), and Execute().
1.5.3 written by Dimitri van Heesch,
© 1997-2000