#include <freControllerCollector.h>
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 () |
| ControllerListType & | GetControllerList () |
| 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) | |
| ControllerCollector & | operator= (const ControllerCollector &destionation) |
Private Attributes | |
| ControllerListType | m_Controllers |
| ProgressEventBase::Pointer | m_fnOnControl |
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.
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.
Standard class typedefs.
Definition at line 110 of file freControllerCollector.h.
| 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] |
| 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.

| ControllerListType& FREE::ControllerCollector::GetControllerList | ( | ) | [inline] |
| const ControllerListType& FREE::ControllerCollector::GetControllerList | ( | ) | const [inline] |
| void FREE::ControllerCollector::SetOnControlEvent | ( | ProgressEventBase * | pOnControl | ) |
Sets the progress event the collector will use to give feed back while searching the controllers.
| [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.
| [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. |
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().

| 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().

| ControllerCollector& FREE::ControllerCollector::operator= | ( | const ControllerCollector & | destionation | ) | [private] |
List of registered controllers
Definition at line 145 of file freControllerCollector.h.
Referenced by ControllerCollector(), GetControllerList(), Initialize(), and LoadLibrariesInPath().
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().
1.5.3 written by Dimitri van Heesch,
© 1997-2000