FREE::SetupManager Class Reference
[SessionSetup]

Class assists in task of creating consistent setups. More...

#include <freSetupManager.h>

Collaboration diagram for FREE::SetupManager:

Collaboration graph
FREE::CtrlProfile::ProfileRequirementsFREE::XMLCollectionBase\< FREE::CtrlProfile::ProfileRequirement \>FREE::XMLStreamObjectFREE::SmartCollectionBase\< TXMLElement \>FREE::CollectionBase\< TXMLElement, itk::SmartPointer\< TXMLElement \> \>
[legend]

List of all members.

Public Types

typedef SetupManager Self
typedef itk::LightObject Superclass
typedef
itk::SmartPointer
< Self
Pointer
typedef
itk::SmartPointer
< const Self
ConstPointer
typedef
SessionComponentCache::ComponentCacheCollectionType 
ComponentCacheCollectionType
typedef
CtrlProfile::ProfileRequirements 
ProfileRequirementsType
typedef STLStringVector ControllerListType

Public Member Functions

virtual const char * GetNameOfClass () const
virtual
::itk::LightObject::Pointer 
CreateAnother (void) const
SetupGetSetup () const
void SetSetup (Setup *pSetup)
const
SessionComponentCache
GetSessionCache () const
SessionComponentCacheGetSessionCache ()
const
ComponentCacheCollectionType
GetComponentCaches () const
ComponentCacheCollectionTypeGetComponentCaches ()
const
ProfileRequirementsType
GetRequirementCache () const
ProfileRequirementsTypeGetRequirementCache ()
ControllerListType GetPossibleControllers (const IDPath &componentID, const bool &bCheckOnlyHypothetical=false)
bool ValidateController (const IDPath &componentID, const std::string &sControllername, IDPathVectorType &rRefusingComponents, IDPathVectorType &rRefusedComponents)
bool ValidateController (const IDPath &componentID, const std::string &sControllername)
void InitializeComponentSetup (Setup *pSetup, ComponentSetup *pComponentSetup)
void InitializeComponentSetup (Setup *pSetup, ComponentSetup *pComponentSetup, const std::string &sControllerName)
void InitializeComponentSetup (ComponentSetup *pComponentSetup, const std::string &sControllerName)
void ActualizeConstraintCache (Setup *pSetup)

Static Public Member Functions

static Pointer New (void)

Protected Member Functions

 SetupManager ()

Static Protected Member Functions

static void ActualizeConstraintCache (Setup *pSetup, const IDPath &componentID, const std::string &sControllername)
static void ActualizeConstraintCache (Setup *pSetup, ComponentSetup *pComponentSetup)

Protected Attributes

Setup::Pointer m_smpSetup
SessionComponentCache::Pointer m_smpRootCache
ProfileRequirementsType m_RequirementCache

Private Member Functions

 SetupManager (const SetupManager &rSetupManager)


Detailed Description

Class assists in task of creating consistent setups.

SetupManager is used to establish consistent setups, be using the profile information provided by the component controller. SetupManager is able to create a passive session and administrate the constraints present in the setup. Adding or changing setup elements via the manager also provides that changes in other parts of the setup caused by the change are detected.

Definition at line 44 of file freSetupManager.h.


Member Typedef Documentation

typedef SetupManager FREE::SetupManager::Self

Definition at line 47 of file freSetupManager.h.

typedef itk::LightObject FREE::SetupManager::Superclass

Definition at line 48 of file freSetupManager.h.

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

Definition at line 49 of file freSetupManager.h.

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

Definition at line 50 of file freSetupManager.h.

typedef SessionComponentCache::ComponentCacheCollectionType FREE::SetupManager::ComponentCacheCollectionType

Definition at line 53 of file freSetupManager.h.

typedef CtrlProfile::ProfileRequirements FREE::SetupManager::ProfileRequirementsType

Definition at line 56 of file freSetupManager.h.

typedef STLStringVector FREE::SetupManager::ControllerListType

Definition at line 75 of file freSetupManager.h.


Constructor & Destructor Documentation

FREE::SetupManager::SetupManager (  )  [protected]

Constructor. The default section ID will be 0

Parameters:
[in] pSetup Pointer to the associated setup

Definition at line 284 of file freSetupManager.cxx.

References m_smpRootCache, and m_smpSetup.

FREE::SetupManager::SetupManager ( const SetupManager rSetupManager  )  [private]

suppress default copy constructor


Member Function Documentation

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

Definition at line 52 of file freSetupManager.h.

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

Definition at line 53 of file freSetupManager.h.

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

Definition at line 53 of file freSetupManager.h.

Setup * FREE::SetupManager::GetSetup (  )  const

Function to access the member variable m_pComponentSetup.

Returns:
Pointer to m_pSetup.

Definition at line 230 of file freSetupManager.cxx.

References m_smpSetup.

void FREE::SetupManager::SetSetup ( Setup pSetup  ) 

Definition at line 237 of file freSetupManager.cxx.

References FREE::SessionBuilder::GeneratePassiveComponentCache(), FREE::Setup::GetRootComponent(), m_RequirementCache, m_smpRootCache, m_smpSetup, and FREE::XMLCollectionBase< TXMLElement >::Reset().

Here is the call graph for this function:

FREE::SessionBuilder::GeneratePassiveComponentCacheFREE::Setup::GetRootComponentFREE::XMLCollectionBase::ResetFREE::ComponentSetup::ComponentsFREE::ControllerCentral::GetControllerFREE::ComponentSetup::GetControllerIDFREE::KeyedCollectionBase::GetElementFREE::SessionComponentCache::NewFREE::CollectionBase::SizeFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::KeyedCollectionBase::GetElementIndexFREE::XMLStreamObject::Reset

const SessionComponentCache * FREE::SetupManager::GetSessionCache (  )  const

Function to access the member variable m_pRootCache.

Returns:
Pointer to m_pRootCache.

Definition at line 249 of file freSetupManager.cxx.

References m_smpRootCache.

SessionComponentCache * FREE::SetupManager::GetSessionCache (  ) 

Definition at line 256 of file freSetupManager.cxx.

References m_smpRootCache.

const SetupManager::ComponentCacheCollectionType & FREE::SetupManager::GetComponentCaches (  )  const

Function to access the collection of first level component caches.

Returns:
Pointer to m_pRootCache->SubCaches().

Definition at line 263 of file freSetupManager.cxx.

References m_smpRootCache, and throwExceptionMacro.

SetupManager::ComponentCacheCollectionType & FREE::SetupManager::GetComponentCaches (  ) 

Definition at line 274 of file freSetupManager.cxx.

References m_smpRootCache, and throwExceptionMacro.

const ProfileRequirementsType& FREE::SetupManager::GetRequirementCache (  )  const [inline]

Definition at line 74 of file freSetupManager.h.

References m_RequirementCache.

ProfileRequirementsType& FREE::SetupManager::GetRequirementCache (  )  [inline]

Definition at line 75 of file freSetupManager.h.

References m_RequirementCache.

SetupManager::ControllerListType FREE::SetupManager::GetPossibleControllers ( const IDPath componentID,
const bool &  bCheckOnlyHypothetical = false 
)

Function searches through the list of registered controllers for all controllers, which are suitable for the needed component regarding the given constraints by other chosen components.

Parameters:
[in] componentID The ID path to the component setup for which possible controllers should be selected.
[in] bCheckOnlyHypothetical Determines if the selction should be only driven by the constraints of the parent component (true) or also by the constraints of other components (including the component to be chosen) (false). So this flag can be used to determine if the result should contain all controllers (true), even if constraints of yet chosen components violate, or only the controllers which can really be used in this current setup (false).
Returns:
Vector with controller IDs to all possible controllers.
Implementation of FREE::freSetupManager /////////////////////////////

Definition at line 34 of file freSetupManager.cxx.

References FREE::ComponentControllerInterface::ControllerID(), FREE::ControllerCentral::GetControllers(), FREE::ComponentSetup::GetIDPath(), FREE::ComponentSetup::GetParentComponent(), m_smpSetup, throwStaticExceptionMacro, and ValidateController().

Here is the call graph for this function:

FREE::ComponentControllerInterface::ControllerIDFREE::ControllerCentral::GetControllersFREE::ComponentSetup::GetIDPathFREE::ComponentSetup::GetParentComponentFREE::SetupManager::ValidateControllerFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::ControllerCentral::GetControllerFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ComponentSetup::HasParentComponent

bool FREE::SetupManager::ValidateController ( const IDPath componentID,
const std::string &  sControllername,
IDPathVectorType rRefusingComponents,
IDPathVectorType rRefusedComponents 
)

Checks if a given controller can be used as controller for the specified component, regarding the given constraints of the setup. If the controller is not valid the controllers responsible for the refusal are listed and passed back.

Parameters:
[in] componentID The ID path to the component setup for which possible controllers should be selected. The component setup is a part of the passed setup (pSetup).
[in] sControllername Name of the controller, that should be validated.
[in] rRefusingComponents Vector with IDPathes of the components, which refuses the controller for any reason.
[in] rRefusedComponents Vector with IDPathes of the components, which are refused by the controller .
Returns:
Boolean indicating if the controller is valid or not.

Definition at line 80 of file freSetupManager.cxx.

Referenced by GetPossibleControllers(), InitializeComponentSetup(), and ValidateController().

bool FREE::SetupManager::ValidateController ( const IDPath componentID,
const std::string &  sControllername 
)

Definition at line 142 of file freSetupManager.cxx.

References ValidateController().

Here is the call graph for this function:

FREE::SetupManager::ValidateController

void FREE::SetupManager::InitializeComponentSetup ( Setup pSetup,
ComponentSetup pComponentSetup 
)

Function intitializes a setup component of the setup, by calling the InitializeSetup() function of the controller. Also the constraint cache of the setup will be updated by adding the constraints of the intializing controller and adapting the constraints to the position of the component within the setup.

Remarks:
When calling this member function, the ControllerID should be defined for the setup component.
Parameters:
[in] pSetup Pointer to the setup. The constraint cache is gained from here, also the component setup specified by componentID.
[in,out] pComponentSetup Pointer to the component setup, that should be initialized. The component setup is a part of the passed setup (pSetup).

Definition at line 151 of file freSetupManager.cxx.

References FREE::ComponentSetup::GetControllerID(), and throwStaticExceptionMacro.

Referenced by InitializeComponentSetup().

Here is the call graph for this function:

FREE::ComponentSetup::GetControllerID

void FREE::SetupManager::InitializeComponentSetup ( Setup pSetup,
ComponentSetup pComponentSetup,
const std::string &  sControllerName 
)

Function intitializes a setup component of the setup, by calling the InitializeSetup() function of the controller. The controller name of the ComponentSetup will be set to the passed name (sControllerName).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
[in] pSetup Pointer to the setup. The constraint cache is gained from here, also the component setup specified by componentID.
[in,out] pComponentSetup Pointer to the component setup, that should be initialized. The component setup is a part of the passed setup (pSetup).
[in] sControllerName Name of the controller, which should be used for initialization.

Definition at line 160 of file freSetupManager.cxx.

References ActualizeConstraintCache(), FREE::ComponentSetup::Components(), FREE::ComponentSetup::ControllerIsAssigned(), FREE::csUndefinedController, FREE::ComponentSetup::GetComponentID(), FREE::ControllerCentral::GetController(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::ComponentSetup::GetIDPath(), InitializeComponentSetup(), FREE::ComponentSetup::Reset(), FREE::ComponentSetup::SetComponentID(), FREE::CollectionBase< TElement, TStorageType >::Size(), throwStaticExceptionMacro, FREE::IDPath::ToStr(), FREE::ControllerCentral::TriggerBuildEvent(), and ValidateController().

Here is the call graph for this function:

FREE::SetupManager::ActualizeConstraintCacheFREE::ComponentSetup::ComponentsFREE::ComponentSetup::ControllerIsAssignedFREE::ComponentSetup::GetComponentIDFREE::ControllerCentral::GetControllerFREE::KeyedCollectionBase::GetElementFREE::ComponentSetup::GetIDPathFREE::SetupManager::InitializeComponentSetupFREE::ComponentSetup::ResetFREE::ComponentSetup::SetComponentIDFREE::CollectionBase::SizeFREE::IDPath::ToStrFREE::ControllerCentral::TriggerBuildEventFREE::SetupManager::ValidateControllerFREE::CtrlProfile::ProfileRequirements::AddRequirementFREE::CtrlProfile::ProfileOption::CheckForIOFREE::Setup::GetSectionsFREE::XMLCollectionBase::ResetFREE::SmartCollectionBase\< TXMLElement \>::AddElementFREE::CtrlProfile::ProfileRequirement::NewFREE::XMLStreamObject::ResetFREE::ComponentSetup::GetControllerIDFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentSetup::HasParentComponentFREE::XMLKeyedCollectionBase::ResetFREE::ComponentSetup::ResetParametersFREE::ParameterCollection::ResetFREE::ParameterCollection::ResetParametersFREE::ParameterCollection::DeleteParameterFREE::ParameterCollection::GetParameterIndexFREE::IDPath::Size

void FREE::SetupManager::InitializeComponentSetup ( ComponentSetup pComponentSetup,
const std::string &  sControllerName 
)

Function intitializes a setup component of the setup, by calling the InitializeSetup() function of the controller. The controller name of the ComponentSetup will be set to the passed name (sControllerName).

Remarks:
In difference to the other versions, this one doesn't check if the choosen controller is legal. Use this version only if you want a plain initialisation of a component and subcomponent, without any consitency checks.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parameters:
[in] pSetup Pointer to the setup. The constraint cache is gained from here, also the component setup specified by componentID.
[in,out] pComponentSetup Pointer to the component setup, that should be initialized. The component setup is a part of the passed setup (pSetup).
[in] sControllerName Name of the controller, which should be used for initialization.

Definition at line 198 of file freSetupManager.cxx.

References FREE::ComponentSetup::Components(), FREE::ComponentSetup::ControllerIsAssigned(), FREE::csUndefinedController, FREE::ComponentSetup::GetComponentID(), FREE::ControllerCentral::GetController(), FREE::ComponentSetup::GetControllerID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::ComponentSetup::GetIDPath(), InitializeComponentSetup(), FREE::ComponentSetup::Reset(), FREE::ComponentSetup::SetComponentID(), FREE::CollectionBase< TElement, TStorageType >::Size(), throwStaticExceptionMacro, FREE::IDPath::ToStr(), and FREE::ControllerCentral::TriggerBuildEvent().

Here is the call graph for this function:

FREE::ComponentSetup::ComponentsFREE::ComponentSetup::ControllerIsAssignedFREE::ComponentSetup::GetControllerIDFREE::ComponentSetup::GetComponentIDFREE::ControllerCentral::GetControllerFREE::KeyedCollectionBase::GetElementFREE::ComponentSetup::GetIDPathFREE::SetupManager::InitializeComponentSetupFREE::ComponentSetup::ResetFREE::ComponentSetup::SetComponentIDFREE::CollectionBase::SizeFREE::IDPath::ToStrFREE::ControllerCentral::TriggerBuildEventFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentSetup::HasParentComponentFREE::XMLKeyedCollectionBase::ResetFREE::XMLStreamObject::ResetFREE::ComponentSetup::ResetParametersFREE::ParameterCollection::ResetFREE::ParameterCollection::ResetParametersFREE::ParameterCollection::DeleteParameterFREE::ParameterCollection::GetParameterIndexFREE::IDPath::Size

void FREE::SetupManager::ActualizeConstraintCache ( Setup pSetup  ) 

Actualizes ths constraint cache of the passed setup by browsing through all components and calling ActualizeConstraintCache for every component setup.

Parameters:
[in] pSetup Pointer to the setup. The constraint cache is gained from here, also the component setups.

Definition at line 320 of file freSetupManager.cxx.

References FREE::CtrlProfile::ProfileRequirements::AddRequirement(), FREE::CtrlProfile::ProfileOption::CheckForIO(), FREE::cIDPEveryone, FREE::Setup::GetSections(), m_RequirementCache, and FREE::XMLCollectionBase< TXMLElement >::Reset().

Referenced by ActualizeConstraintCache(), and InitializeComponentSetup().

Here is the call graph for this function:

FREE::CtrlProfile::ProfileRequirements::AddRequirementFREE::CtrlProfile::ProfileOption::CheckForIOFREE::Setup::GetSectionsFREE::XMLCollectionBase::ResetFREE::SmartCollectionBase\< TXMLElement \>::AddElementFREE::CtrlProfile::ProfileRequirement::NewFREE::XMLStreamObject::Reset

void FREE::SetupManager::ActualizeConstraintCache ( Setup pSetup,
const IDPath componentID,
const std::string &  sControllername 
) [static, protected]

Used by InitializeComponentSetup. Adds the constraints of pController to the constraint cache of the setup. And adapts the added constraints to the position of the componentID.

Parameters:
[in,out] pSetup Pointer to the setup. The constraint cache is gained from here, also the component setup specified by componentID.
[in] componentID The ID path to the component setup the controller is responsible for.
[in] sControllername Controller ID of the controller, that should be validated.

Definition at line 292 of file freSetupManager.cxx.

void FREE::SetupManager::ActualizeConstraintCache ( Setup pSetup,
ComponentSetup pComponentSetup 
) [static, protected]

Actualizes the constraint cache of the passed setup with the constraints of the passed component setup, but only if a controller has been specified for the component. The actualization uses the protected version of the member function

Parameters:
[in,out] pSetup Pointer to the setup. The constraint cache is gained from here.
[in] pComponentSetup Pointer to the component setup, which is the source of constraints.

Definition at line 337 of file freSetupManager.cxx.

References ActualizeConstraintCache(), FREE::ComponentSetup::Components(), FREE::csUndefinedController, FREE::ComponentSetup::GetControllerID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::ComponentSetup::GetIDPath(), and FREE::CollectionBase< TElement, TStorageType >::Size().

Here is the call graph for this function:

FREE::SetupManager::ActualizeConstraintCacheFREE::ComponentSetup::ComponentsFREE::ComponentSetup::GetControllerIDFREE::KeyedCollectionBase::GetElementFREE::ComponentSetup::GetIDPathFREE::CollectionBase::SizeFREE::CtrlProfile::ProfileRequirements::AddRequirementFREE::CtrlProfile::ProfileOption::CheckForIOFREE::Setup::GetSectionsFREE::XMLCollectionBase::ResetFREE::SmartCollectionBase\< TXMLElement \>::AddElementFREE::CtrlProfile::ProfileRequirement::NewFREE::XMLStreamObject::ResetFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentSetup::HasParentComponent


Member Data Documentation

Setup::Pointer FREE::SetupManager::m_smpSetup [protected]

Pointer to the associated setup for this registration session.

Definition at line 158 of file freSetupManager.h.

Referenced by GetPossibleControllers(), GetSetup(), SetSetup(), and SetupManager().

SessionComponentCache::Pointer FREE::SetupManager::m_smpRootCache [protected]

Pointer to the root section cache (corresponding the root component in the setup).

Definition at line 161 of file freSetupManager.h.

Referenced by GetComponentCaches(), GetSessionCache(), SetSetup(), and SetupManager().

ProfileRequirementsType FREE::SetupManager::m_RequirementCache [protected]

The Cache with all current constraints for the setup.

Definition at line 164 of file freSetupManager.h.

Referenced by ActualizeConstraintCache(), GetRequirementCache(), and SetSetup().


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