00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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;
00034 class SessionComponentCache;
00035
00041 class SessionAccessor
00042 {
00043 public:
00044
00046
00053 static ValidityTag::Pointer GetValidityTag(const IDPath& path, SessionComponentCache* pComponentCache);
00054
00063 static ValidityTag::Pointer GetValidityTagRequirement(const IDPath& path, SessionComponentCache* pComponentCache);
00064
00065
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
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 }
00229
00230 #endif