freSessionAccessor.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: freSessionAccessor.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 __freSessionAccessor_h
00023 #define __freSessionAccessor_h
00024 
00025 #include "freElementals.h"
00026 #include "freParameter.h"
00027 #include "freIDPath.h"
00028 #include "freValidityTag.h"
00029 
00030 namespace FREE
00031 {
00032 
00033 class SessionInfo; //will be included in the implementation part, to avoid circular reference
00034 class SessionComponentCache;  //will be included in the implementation part, to avoid circular reference
00035 
00041 class SessionAccessor
00042 {
00043 public:
00044   //  General interface part  //
00046 
00053   static ValidityTag::Pointer GetValidityTag(const IDPath& path, SessionComponentCache* pComponentCache); 
00054 
00063   static ValidityTag::Pointer GetValidityTagRequirement(const IDPath& path, SessionComponentCache* pComponentCache); 
00064 
00065   //   Media interface part   //
00067 
00068   typedef GenericMediaType::Pointer GenericMediaPointer;
00069 
00079   static GenericMediaPointer GetMedia(const IDPath& mediaID, SessionInfo* pInfo);
00080 
00094   static GenericMediaPointer GetLinkedMedia(const std::string& sMediaID,
00095                                             SessionComponentCache* pComponentCache,
00096                                             SessionInfo* pInfo,
00097                                             bool bMissingLinkException = false);
00098 
00106   static void SetMedia(const IDPath& mediaID, GenericMediaPointer& rMedia, SessionInfo* pInfo);
00107 
00111   static std::string GetMediaControllerID(const IDPath& mediaID, SessionComponentCache* pComponentCache); 
00112 
00113   // Parameter interface part //
00115 
00129   static void GetParameterValueByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID, std::string& value, bool bGetLastValidLayer = false);
00130 
00132   static void GetParameterValueByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID, bool& value, bool bGetLastValidLayer = false);
00133 
00135   static void GetParameterValueByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID, double& value, bool bGetLastValidLayer = false);
00136   
00138   static void GetParameterValueByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID, int& value, bool bGetLastValidLayer = false);
00139 
00141   static void GetParameterValueByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID, long& value, bool bGetLastValidLayer = false);
00142 
00144   static void GetParameterValueByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID, unsigned long& value, bool bGetLastValidLayer = false);
00145 
00158   static void GetParameterValue(const SessionComponentCache* pComponentCache, const std::string& sParameterName, std::string& value, const Parameter::ValueCountType& iItemPos = 0, const Parameter::LayerCountType& iLayer = 0, const bool& bGetLastValidLayer = false);
00159 
00161   static void GetParameterValue(const SessionComponentCache* pComponentCache, const std::string& sParameterName, bool& value, const Parameter::ValueCountType& iItemPos = 0, const Parameter::LayerCountType& iLayer = 0, const bool& bGetLastValidLayer = false);
00162 
00164   static void GetParameterValue(const SessionComponentCache* pComponentCache, const std::string& sParameterName, double& value, const Parameter::ValueCountType& iItemPos = 0, const Parameter::LayerCountType& iLayer = 0, const bool& bGetLastValidLayer = false);
00165   
00167   static void GetParameterValue(const SessionComponentCache* pComponentCache, const std::string& sParameterName, int& value, const Parameter::ValueCountType& iItemPos = 0, const Parameter::LayerCountType& iLayer = 0, const bool& bGetLastValidLayer = false);
00168 
00170   static void GetParameterValue(const SessionComponentCache* pComponentCache, const std::string& sParameterName, long& value, const Parameter::ValueCountType& iItemPos = 0, const Parameter::LayerCountType& iLayer = 0, const bool& bGetLastValidLayer = false);
00171 
00173   static void GetParameterValue(const SessionComponentCache* pComponentCache, const std::string& sParameterName, unsigned long& value, const Parameter::ValueCountType& iItemPos = 0, const Parameter::LayerCountType& iLayer = 0, const bool& bGetLastValidLayer = false);
00174 
00183   static Parameter::Pointer GetParameter(const SessionComponentCache* pComponentCache, const std::string& sParameterName);
00196   static Parameter::Pointer GetParameterByIDPath(const SessionComponentCache* pComponentCache, const IDPath& parameterID);
00197 
00198 
00209   static void SetParameterValueByIDPath(SessionComponentCache* pComponentCache, const IDPath& parameterID, const std::string& value);
00210 
00212   static void SetParameterValueByIDPath(SessionComponentCache* pComponentCache, const IDPath& parameterID, const bool& value);
00213 
00215   static void SetParameterValueByIDPath(SessionComponentCache* pComponentCache, const IDPath& parameterID, const double& value);
00216   
00218   static void SetParameterValueByIDPath(SessionComponentCache* pComponentCache, const IDPath& parameterID, const int& value);
00219 
00221   static void SetParameterValueByIDPath(SessionComponentCache* pComponentCache, const IDPath& parameterID, const long& value);
00222 
00224   static void SetParameterValueByIDPath(SessionComponentCache* pComponentCache, const IDPath& parameterID, const unsigned long& value);
00225 
00226 };
00227 
00228 } //end of namespace free;
00229 
00230 #endif

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