00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freSetupManager_h
00023 #define __freSetupManager_h
00024
00025 #include "freSetup.h"
00026 #include "freSessionComponentCache.h"
00027 #include "freProfileRequirements.h"
00028
00029 namespace FREE
00030 {
00031
00044 class SetupManager : public itk::LightObject
00045 {
00046 public:
00047 typedef SetupManager Self;
00048 typedef itk::LightObject Superclass;
00049 typedef itk::SmartPointer<Self> Pointer;
00050 typedef itk::SmartPointer<const Self> ConstPointer;
00051
00052 itkTypeMacro(SetupManager, LightObject);
00053 itkNewMacro(SetupManager);
00054
00055 typedef SessionComponentCache::ComponentCacheCollectionType ComponentCacheCollectionType;
00056 typedef CtrlProfile::ProfileRequirements ProfileRequirementsType;
00057
00060 Setup* GetSetup() const;
00061
00062 void SetSetup(Setup* pSetup);
00063
00066 const SessionComponentCache* GetSessionCache() const;
00067 SessionComponentCache* GetSessionCache();
00068
00071 const ComponentCacheCollectionType& GetComponentCaches() const;
00072 ComponentCacheCollectionType& GetComponentCaches();
00073
00074 const ProfileRequirementsType& GetRequirementCache() const {return m_RequirementCache;};
00075 ProfileRequirementsType& GetRequirementCache() {return m_RequirementCache;};
00076
00077 typedef STLStringVector ControllerListType;
00078
00091 ControllerListType GetPossibleControllers(const IDPath& componentID, const bool& bCheckOnlyHypothetical = false);
00092
00104 bool ValidateController(const IDPath& componentID, const std::string& sControllername, IDPathVectorType& rRefusingComponents, IDPathVectorType& rRefusedComponents);
00106 bool ValidateController(const IDPath& componentID, const std::string& sControllername);
00107
00119 void InitializeComponentSetup(Setup* pSetup, ComponentSetup* pComponentSetup);
00129 void InitializeComponentSetup(Setup* pSetup, ComponentSetup* pComponentSetup,
00130 const std::string& sControllerName);
00143 void InitializeComponentSetup(ComponentSetup* pComponentSetup,
00144 const std::string& sControllerName);
00145
00150 void ActualizeConstraintCache(Setup* pSetup);
00151
00152 protected:
00155 SetupManager();
00156
00158 Setup::Pointer m_smpSetup;
00159
00161 SessionComponentCache::Pointer m_smpRootCache;
00162
00164 ProfileRequirementsType m_RequirementCache;
00165
00172 static void ActualizeConstraintCache(Setup* pSetup, const IDPath& componentID, const std::string& sControllername);
00173
00179 static void ActualizeConstraintCache(Setup* pSetup, ComponentSetup* pComponentSetup);
00180
00181 private:
00183 SetupManager( const SetupManager& rSetupManager );
00184 };
00185
00186 }
00187
00188 #endif