#include <freSetupManager.h>

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 |
| Setup * | GetSetup () const |
| void | SetSetup (Setup *pSetup) |
| const SessionComponentCache * | GetSessionCache () const |
| SessionComponentCache * | GetSessionCache () |
| const ComponentCacheCollectionType & | GetComponentCaches () const |
| ComponentCacheCollectionType & | GetComponentCaches () |
| const ProfileRequirementsType & | GetRequirementCache () const |
| ProfileRequirementsType & | GetRequirementCache () |
| 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) | |
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.
| 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.
Definition at line 56 of file freSetupManager.h.
Definition at line 75 of file freSetupManager.h.
| FREE::SetupManager::SetupManager | ( | ) | [protected] |
Constructor. The default section ID will be 0
| [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
| 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.
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().

| const SessionComponentCache * FREE::SetupManager::GetSessionCache | ( | ) | const |
Function to access the member variable m_pRootCache.
Definition at line 249 of file freSetupManager.cxx.
References m_smpRootCache.
| SessionComponentCache * FREE::SetupManager::GetSessionCache | ( | ) |
| const SetupManager::ComponentCacheCollectionType & FREE::SetupManager::GetComponentCaches | ( | ) | const |
Function to access the collection of first level component caches.
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] |
| ProfileRequirementsType& FREE::SetupManager::GetRequirementCache | ( | ) | [inline] |
| 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.
| [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). |
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().

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

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

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

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

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

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

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().
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().
The Cache with all current constraints for the setup.
Definition at line 164 of file freSetupManager.h.
Referenced by ActualizeConstraintCache(), GetRequirementCache(), and SetSetup().
1.5.3 written by Dimitri van Heesch,
© 1997-2000