00001 #ifndef Impala_Persistency_FeatureTableRepository_h 00002 #define Impala_Persistency_FeatureTableRepository_h 00003 00004 #include "Persistency/RepositoryDispatcher.h" 00005 #include "Persistency/FeatureTableRepositoryInFile.h" 00006 #include "Persistency/FeatureTableRepositoryInMonet.h" 00007 00008 namespace Impala 00009 { 00010 namespace Persistency 00011 { 00012 00013 00014 class FeatureTableRepository 00015 : public RepositoryDispatcher<FeatureLocator, 00016 Core::Feature::FeatureTable, 00017 FeatureTableRepositoryInFile, 00018 FeatureTableRepositoryInMonet> 00019 { 00020 public: 00021 00022 bool 00023 Exists(const FeatureLocator& loc) 00024 { 00025 String protocol = loc.GetProtocol(); 00026 if ((protocol == "file") || (protocol == "dataServer")) 00027 { 00028 return mRepFile.Exists(loc); 00029 } 00030 /* 00031 if (protocol == "mapi") 00032 { 00033 return mRepMonet.Get(loc); 00034 } 00035 */ 00036 ILOG_ERROR("Get: unknown protocol: [" << loc.GetProtocol() << "] in " 00037 << loc); 00038 return false; 00039 } 00040 00041 }; 00042 00043 } // namespace Persistency 00044 } // namespace Impala 00045 00046 #endif