00001 #ifndef Impala_Core_ImageSet_ApplyConcepts_h 00002 #define Impala_Core_ImageSet_ApplyConcepts_h 00003 00004 #include "Core/ImageSet/Reporter.h" 00005 #include "Core/Training/ApplyConcepts.h" 00006 00007 namespace Impala 00008 { 00009 namespace Core 00010 { 00011 namespace ImageSet 00012 { 00013 00014 class ApplyConcepts : public Listener 00015 { 00016 public: 00017 00018 ApplyConcepts(Reporter* reporter, CmdOptions& options, ImageSet* is, 00019 bool onIndex) 00020 { 00021 mOnIndex = onIndex; 00022 mApplier = new Training::ApplyConcepts(options, is, mOnIndex); 00023 } 00024 00025 virtual 00026 ~ApplyConcepts() 00027 { 00028 delete mApplier; 00029 } 00030 00031 virtual void 00032 HandleNewWalk(ImageSet* is, String walkType) 00033 { 00034 if (!mOnIndex) 00035 mApplier->SetWalkType(walkType); 00036 } 00037 00038 virtual void 00039 HandleDoneDir(ImageSet* is, int dirId) 00040 { 00041 if (!mOnIndex) 00042 mApplier->NextContainer(is->GetContainer(dirId)); 00043 } 00044 00045 virtual void 00046 HandleDoneWalk(ImageSet* is) 00047 { 00048 if (mOnIndex) 00049 mApplier->NextContainer(""); 00050 } 00051 00052 private: 00053 00054 Training::ApplyConcepts* mApplier; 00055 bool mOnIndex; 00056 00057 ILOG_VAR_DEC; 00058 }; 00059 00060 ILOG_VAR_INIT(ApplyConcepts, Impala.Core.ImageSet); 00061 00062 } // namespace ImageSet 00063 } // namespace Core 00064 } // namespace Impala 00065 00066 #endif