freControllerInterface.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freComponentControllerInterface.h,v $
00007   Language:  C++
00008 
00009 
00010 
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016 
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
00020 
00021 =========================================================================*/
00022 #ifndef __freComponentControllerInterface_h
00023 #define __freComponentControllerInterface_h
00024 
00025 #include "freElementals.h"
00026 #include "freExceptions.h"
00027 #include "freControllerEvents.h"
00028 #include "freComponentSetup.h"
00029 #include "freControllerProfile.h"
00030 #include "freSessionComponentCache.h"
00031 #include "freSessionInfo.h"
00032 #include "freValidityTag.h"
00033 
00034 #include "itkLightObject.h"
00035 
00036 namespace FREE
00037 {
00038 
00050 class ComponentControllerInterface
00051 {
00052 public:
00054   typedef itk::LightObject GenericComponentType;
00056   typedef GenericComponentType::Pointer GenericComponentPointer;
00057 
00058   typedef ::FREE::GenericMediaType GenericMediaType;
00059   typedef GenericMediaType::Pointer GenericMediaPointer;
00060 
00061   virtual const char *GetNameOfClass() const {return "ComponentControllerInterface";};
00062 
00064   const std::string& ControllerID() const {return this->m_ControllerID;};
00066   const std::string& Description() const {return this->m_Description;};
00068   const CtrlProfile::ProfileInheritance& ProfileInheritance() const {return this->m_Inheritance;};
00069 
00073   bool IsRelatedTo(const std::string& sControllerID) const;
00074 
00077   virtual CtrlProfile::ControllerProfile::Pointer GetProfile(const SessionComponentCache* pComponentCache) const = 0;
00078 
00079   typedef std::vector<IDPath> AffectedElementListType;
00080 
00084   virtual AffectedElementListType GetAffectedProfileElements(const IDPath& affectorID,
00085                                                              SessionComponentCache* pComponentCache,
00086                                                              const ComponentSetup* pNewAffectorSetup = 0) const = 0;
00087 
00090   virtual bool ControllerIsResponsible(const GenericComponentType* pComponent) const = 0;
00091 
00094   virtual void InitializeSetup(ComponentSetup* pComponentSetup, SessionComponentCache* pComponentCache) const = 0;
00095 
00098   virtual SessionComponentCache::Pointer BuildSetup(ComponentSetup* pComponentSetup,
00099                                                     SessionComponentCache* pParentComponentCache) const = 0;
00100 
00104    virtual const bool CheckComponentActualizationNecessity(const SessionComponentCache* pComponentCache) const = 0;
00105 
00108   virtual void ActualizeComponent(SessionComponentCache* pComponentCache,
00109                                   SessionInfo* pSessionInfo,
00110                                   const unsigned int& iActiveLayer = 0) const = 0;
00111 
00115   virtual void ResetComponent(SessionComponentCache* pComponentCache,
00116                               SessionInfo* pSessionInfo) const = 0;
00117 
00120   virtual void SetStatisticEntry(StatisticEntry& rStatisticEntry,
00121                                  SessionComponentCache* pComponentCache,
00122                                  SessionInfo* pSessionInfo) const = 0;
00123 
00126   virtual GenericComponentPointer GetGenericComponent(const SessionComponentCache* pComponentCache) const = 0; 
00127 
00130   virtual void SetGenericComponent(GenericComponentType* pGenericComponent, SessionComponentCache* pComponentCache) const = 0; 
00131 
00134   virtual GenericComponentType* GetSubComponent(SessionComponentCache* pMainComponentCache, const ComponentID compID) const = 0; 
00135 
00138   virtual void SetSubComponent(SessionComponentCache* pMainComponentCache, GenericComponentType* pSubComponent, 
00139                        const ComponentID compID) const = 0; 
00140 
00143   virtual GenericMediaPointer GetMedia(const MediaID& mediaID,
00144                                    SessionComponentCache* pComponentCache,
00145                                    SessionInfo* pSessionInfo) const = 0; 
00146 
00149   virtual void SetMedia(const MediaID& mediaID, GenericMediaType* pMedia,
00150                 SessionComponentCache* pComponentCache,
00151                 SessionInfo* pSessionInfo) const = 0; 
00152         
00155   virtual ValidityTag::Pointer GetMediaValidityTag(const MediaID& mediaID,
00156                                                    SessionComponentCache* pComponentCache) const = 0; 
00157 
00160   virtual ValidityTag::Pointer GetMediaValidityTagRequirement(const MediaID& mediaID,
00161                                                               SessionComponentCache* pComponentCache) const = 0; 
00162 
00165   virtual std::string GetMediaControllerID(const MediaID& mediaID,
00166                                            SessionComponentCache* pComponentCache) const = 0; 
00167 
00170   virtual Parameter::Pointer GetParameter(const SessionComponentCache* pComponentCache,
00171                                           const std::string& sParameterName) const = 0;
00172 
00175   virtual std::string GetParameterValue(const SessionComponentCache* pComponentCache,
00176                                         const std::string& sParameterName,
00177                                         const Parameter::ValueCountType iItemPos = 0,
00178                                         const Parameter::LayerCountType iLayer = 0) const = 0; 
00179 
00182   virtual void SetParameterValue(SessionComponentCache* pComponentCache,
00183                                  const std::string& sParameterName,
00184                                  const std::string& sValue,
00185                                  const Parameter::ValueCountType iItemPos = 0,
00186                                  const Parameter::LayerCountType iLayer = 0) const = 0; 
00187 
00190   virtual ValidityTag::Pointer GetParameterValidityTag(const std::string& sParameterName,
00191                                                        SessionComponentCache* pComponentCache) const = 0; 
00192 
00195   virtual ValidityTag::Pointer GetParameterValidityTagRequirement(const std::string& sParameterName,
00196                                                                   SessionComponentCache* pComponentCache) const = 0; 
00197 
00198   virtual ~ComponentControllerInterface();
00199 
00200 protected:
00203   ComponentControllerInterface();
00204 
00208   void UpdateControllerID(const std::string& sControllerID);
00209 
00211   std::string m_ControllerID; 
00212 
00214   CtrlProfile::ProfileInheritance m_Inheritance;
00215 
00217   std::string m_Description;
00218 };
00219 
00222 typedef ComponentControllerInterface GenericComponentController;
00223 typedef GenericComponentController::GenericComponentType GenericComponentType;
00224 
00225 } //end of namespace FREE
00226 
00227 #endif

Generated at Sat Oct 13 15:39:58 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000