FREE::ProgressCtrlEventBase Class Reference
[Events]

Abstract event object for progress events of controllers in f.r.e.e.. More...

#include <freControllerEvents.h>

Inheritance diagram for FREE::ProgressCtrlEventBase:

Inheritance graph
FREE::ProgressCtrlEvent\< T \>FREE::NotificationEventBase
[legend]
Collaboration diagram for FREE::ProgressCtrlEventBase:

Collaboration graph
FREE::NotificationEventBaseFREE::SessionComponentCacheFREE::ComponentCacheCollection\< TCache \>FREE::KeyedCollectionBase\< std::string, TCache, FREE::ComponentCacheIdentifier\< TCache \> \>FREE::SmartCollectionBase\< TElement \>FREE::CollectionBase\< TElement, itk::SmartPointer\< TElement \> \>FREE::ComponentControllerInterfaceFREE::CtrlProfile::ProfileInheritanceFREE::XMLStringMultiMapFREE::XMLStreamObject
[legend]

List of all members.

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)
SessionComponentCacheGetACR ()
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
SessionComponentCachem_ACR
itk::SimpleMutexLock m_ACRMutex


Detailed Description

Abstract event object for progress events of controllers in f.r.e.e..

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.

Remarks:
This type of event is thread save. A mutex is controlling the execution of the function pointer, to avoid multiple calls at the same time.

Definition at line 125 of file freControllerEvents.h.


Member Typedef Documentation

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.

typedef ProgressCtrlEventBase FREE::ProgressCtrlEventBase::Self

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.


Constructor & Destructor Documentation

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]

Definition at line 117 of file freControllerEvents.cxx.

References m_ACR, and m_ProgressEvent.


Member Function Documentation

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.

Here is the call graph for this function:

FREE::SessionComponentCache::GetRootCache

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.

Here is the call graph for this function:

FREE::SessionComponentCache::GetRootCache

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.

Parameters:
[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.


Member Data Documentation

ProgEvent FREE::ProgressCtrlEventBase::m_ProgressEvent [private]

Reimplemented in FREE::ProgressCtrlEvent< T >.

Definition at line 154 of file freControllerEvents.h.

Referenced by Execute(), and ProgressCtrlEventBase().

SessionComponentCache* FREE::ProgressCtrlEventBase::m_ACR [private]

Definition at line 155 of file freControllerEvents.h.

Referenced by GetACR(), IsLegalSender(), ProgressCtrlEventBase(), and SetACR().

itk::SimpleMutexLock FREE::ProgressCtrlEventBase::m_ACRMutex [private]

Definition at line 157 of file freControllerEvents.h.

Referenced by IsLegalSender().

itk::SimpleMutexLock FREE::ProgressCtrlEventBase::m_ExecutionMutex [protected]

Definition at line 166 of file freControllerEvents.h.

Referenced by FREE::ProgressCtrlEvent< T >::Execute(), and Execute().


The documentation for this class was generated from the following files:
Generated at Sat Oct 13 18:29:23 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000