00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freProfileMediaMap_h
00023 #define __freProfileMediaMap_h
00024
00025 #include "freProfileMedia.h"
00026 #include "freXMLKeyedCollectionBase.h"
00027
00028 namespace FREE
00029 {
00030 namespace CtrlProfile
00031 {
00032
00033 class MediaIdentifierBase
00034 {
00035 public:
00036 static bool KeyMatches (const std::string& rKey, const Media& rElement) {return rElement.GetName()==rKey;};
00037 };
00038
00044 class ProfileMediaMap: public XMLKeyedCollectionBase<std::string,Media,MediaIdentifierBase>
00045 {
00046 public:
00047 typedef XMLKeyedCollectionBase<std::string,Media,MediaIdentifierBase>::ElementsCountType ElementsCountType;
00048
00057 Media* AddMedia(const std::string& sName, const std::string& sType, const DataAccessType access = DAAny,
00058 const Media::DimensionType& dim = Media::DT_AllDimensions, const unsigned int& iGroupID = 1,
00059 const bool& bInternal = false);
00060
00061 ProfileMediaMap();
00062
00064 ProfileMediaMap( const ProfileMediaMap& rMediaMap);
00065
00066 virtual ~ProfileMediaMap();
00067
00068 protected:
00070 virtual void SubElementLoadProcessing(const std::string& rsXMLSubTag, const std::string& rsXMLSubElement, const std::string& rsXMLSubData);
00071 };
00072
00073 }
00074 }
00075
00076 #endif