FREE::ControllerCollector Class Reference
[Processing engine (API classes)]

Searches for all controllers availabled to f.r.e.e. and collects some basic information. More...

#include <freControllerCollector.h>

List of all members.

Public Types

enum  ControllerStatus { CSActive = 0, CSIgnored = 1, CSOutdated = 2 }
typedef
ControllerCollector 
Self
typedef itk::Object Superclass
typedef
itk::SmartPointer
< Self
Pointer
typedef
itk::SmartPointer
< const Self
ConstPointer
typedef
std::multimap
< std::string,
ControllerCollectorInfo::Pointer
ControllerListType
typedef
ControllerCollector 
Self

Public Member Functions

virtual
::itk::LightObject::Pointer 
CreateAnother (void) const
virtual const char * GetNameOfClass () const
void Initialize ()
ControllerListTypeGetControllerList ()
const
ControllerListType
GetControllerList () const
void SetOnControlEvent (ProgressEventBase *pOnControl)

Static Public Member Functions

static Pointer New (void)

Protected Member Functions

 ControllerCollector ()

Private Member Functions

bool TriggerControlEvent (const int iStatusID, const std::string &sComment, void *pSender=0, long threadID=0)
void LoadDynamicControllers ()
void LoadLibrariesInPath (const char *)
 ControllerCollector (const ControllerCollector &destionation)
ControllerCollectoroperator= (const ControllerCollector &destionation)

Private Attributes

ControllerListType m_Controllers
ProgressEventBase::Pointer m_fnOnControl


Detailed Description

Searches for all controllers availabled to f.r.e.e. and collects some basic information.

ControllerCollector is used to collect some basic information of all controller that are visible for the application. Visible means that the controllers are in DLLs, that are in one of the search pathes (Root, current working directory or FREE_AUTOLOAD_PATH). In contrary to the ControllerCentral the collector also stores information about non active controllers, but he gets no controller instance. Non active controllers may be controllers that belong to an outdated API or have been ignored because there was another controller already loaded with the same controller ID.

Definition at line 89 of file freControllerCollector.h.


Member Typedef Documentation

typedef ControllerCollector FREE::ControllerCollector::Self

Definition at line 92 of file freControllerCollector.h.

typedef itk::Object FREE::ControllerCollector::Superclass

Definition at line 93 of file freControllerCollector.h.

typedef itk::SmartPointer<Self> FREE::ControllerCollector::Pointer

Definition at line 94 of file freControllerCollector.h.

typedef itk::SmartPointer<const Self> FREE::ControllerCollector::ConstPointer

Definition at line 95 of file freControllerCollector.h.

typedef std::multimap<std::string, ControllerCollectorInfo::Pointer> FREE::ControllerCollector::ControllerListType

Definition at line 107 of file freControllerCollector.h.

typedef ControllerCollector FREE::ControllerCollector::Self

Standard class typedefs.

Definition at line 110 of file freControllerCollector.h.


Member Enumeration Documentation

enum FREE::ControllerCollector::ControllerStatus

Enumerator:
CSActive 
CSIgnored 
CSOutdated 

Definition at line 100 of file freControllerCollector.h.


Constructor & Destructor Documentation

FREE::ControllerCollector::ControllerCollector (  )  [protected]

initialize class members

Definition at line 202 of file freControllerCollector.cxx.

References m_Controllers, and m_fnOnControl.

FREE::ControllerCollector::ControllerCollector ( const ControllerCollector destionation  )  [private]


Member Function Documentation

static Pointer FREE::ControllerCollector::New ( void   )  [inline, static]

Definition at line 97 of file freControllerCollector.h.

virtual ::itk::LightObject::Pointer FREE::ControllerCollector::CreateAnother ( void   )  const [inline, virtual]

Definition at line 97 of file freControllerCollector.h.

virtual const char* FREE::ControllerCollector::GetNameOfClass (  )  const [inline, virtual]

Definition at line 98 of file freControllerCollector.h.

void FREE::ControllerCollector::Initialize ( void   ) 

Collects all controller.

Definition at line 229 of file freControllerCollector.cxx.

References catchAllNPassStaticMacro, LoadDynamicControllers(), and m_Controllers.

Here is the call graph for this function:

FREE::ControllerCollector::LoadDynamicControllersFREE::GetGeneralFREEPathFREE::ControllerCollector::LoadLibrariesInPathFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCollectorInfo::NewFREE::ControllerCollector::TriggerControlEvent

ControllerListType& FREE::ControllerCollector::GetControllerList (  )  [inline]

Definition at line 115 of file freControllerCollector.h.

References m_Controllers.

const ControllerListType& FREE::ControllerCollector::GetControllerList (  )  const [inline]

Definition at line 116 of file freControllerCollector.h.

References m_Controllers.

void FREE::ControllerCollector::SetOnControlEvent ( ProgressEventBase pOnControl  ) 

Sets the progress event the collector will use to give feed back while searching the controllers.

Parameters:
[in] pOnControl Pointer to the progress event.

Definition at line 210 of file freControllerCollector.cxx.

References m_fnOnControl.

bool FREE::ControllerCollector::TriggerControlEvent ( const int  iStatusID,
const std::string &  sComment,
void *  pSender = 0,
long  threadID = 0 
) [private]

Triggers control event if m_fnOnControl is set.

Parameters:
[in] iStatusID ID of the current status of progress.
[in] sComment String for adding any comments concerning the new status.
[in] pSender Pointer to the object, which called the event.
[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.
Returns:
Indicates if the control event is set and triggered (true) or not (false).

Definition at line 217 of file freControllerCollector.cxx.

References m_fnOnControl.

Referenced by LoadLibrariesInPath().

void FREE::ControllerCollector::LoadDynamicControllers (  )  [private]

Load dynamic controllers from the FREE_AUTOLOAD_PATH

Load all libraries in FREE_AUTOLOAD_PATH

follow PATH conventions

find PathSeparator in LoadPath

move past separator

Definition at line 50 of file freControllerCollector.cxx.

References FREE::csFREEAutoLoadPath, FREE::GetGeneralFREEPath(), and LoadLibrariesInPath().

Referenced by Initialize().

Here is the call graph for this function:

FREE::GetGeneralFREEPathFREE::ControllerCollector::LoadLibrariesInPathFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCollectorInfo::NewFREE::ControllerCollector::TriggerControlEvent

void FREE::ControllerCollector::LoadLibrariesInPath ( const char *  path  )  [private]

Load all dynamic libraries in the given path

Attempt to load each file in the directory as a shared library

try to make sure the file has at least the extension for a shared library in it.

Look for the symbol itkLoad in the library

if all symbols are found, use them to create the factory from the library

Definition at line 136 of file freControllerCollector.cxx.

References FREE::CreateFullPath(), FREE::ControllerCollectorInfo::CSIgnored, m_Controllers, FREE::NameIsSharedLibrary(), FREE::ControllerCollectorInfo::New(), and TriggerControlEvent().

Referenced by LoadDynamicControllers().

Here is the call graph for this function:

FREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCollectorInfo::NewFREE::ControllerCollector::TriggerControlEvent

ControllerCollector& FREE::ControllerCollector::operator= ( const ControllerCollector destionation  )  [private]


Member Data Documentation

ControllerListType FREE::ControllerCollector::m_Controllers [private]

List of registered controllers

Definition at line 145 of file freControllerCollector.h.

Referenced by ControllerCollector(), GetControllerList(), Initialize(), and LoadLibrariesInPath().

ProgressEventBase::Pointer FREE::ControllerCollector::m_fnOnControl [private]

Function pointer, which enables the ControllerCollector to give feedback about the controller managing.

Definition at line 149 of file freControllerCollector.h.

Referenced by ControllerCollector(), SetOnControlEvent(), and TriggerControlEvent().


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