00001 #ifndef Impala_Persistency_SegmentationRepository_h 00002 #define Impala_Persistency_SegmentationRepository_h 00003 00004 #include "Persistency/RepositoryDispatcher.h" 00005 #include "Persistency/SegmentationRepositoryInFile.h" 00006 #include "Persistency/SegmentationRepositoryInMonet.h" 00007 00008 namespace Impala 00009 { 00010 namespace Persistency 00011 { 00012 00013 00014 class SegmentationRepository 00015 : public RepositoryDispatcher<SegmentationLocator, 00016 Core::VideoSet::Segmentation, 00017 SegmentationRepositoryInFile, 00018 SegmentationRepositoryInMonet> 00019 { 00020 public: 00021 00022 /* Needs an alternative Get since Segmentation constructor requires vidSet 00023 */ 00024 Core::VideoSet::Segmentation* 00025 Get(const SegmentationLocator& loc, Core::VideoSet::VideoSet* vidSet) 00026 { 00027 String protocol = loc.GetProtocol(); 00028 if ((protocol == "file") || (protocol == "dataServer")) 00029 { 00030 return mRepFile.Get(loc, vidSet); 00031 } 00032 if (protocol == "mapi") 00033 { 00034 return mRepMonet.Get(loc, vidSet); 00035 } 00036 ILOG_ERROR("Get: unknown protocol: " << loc.GetProtocol()); 00037 return 0; 00038 } 00039 00040 }; 00041 00042 } // namespace Persistency 00043 } // namespace Impala 00044 00045 #endif