00001 00007 #pragma once 00008 00009 #include <string> 00010 00011 #include "tools/Message.hpp" 00012 00013 namespace Tool { 00014 00015 typedef enum { 00016 Send = 0, 00017 StartSubSection, 00018 FinishSubSection, 00019 StartProgress, 00020 FinishProgress 00021 } LogCommandType; 00022 00023 typedef struct { 00024 LogCommandType type; 00025 bool finish; 00026 std::string text; 00027 Message message; 00028 } LogCommand; 00029 00032 class LogListener { 00033 protected: 00034 int subsection; 00035 LogCommandType state; 00036 00037 virtual std::string formatMessage(const Message &m,const int &subsection); 00038 00039 public: 00040 LogListener(); 00041 00042 virtual void process(const LogCommand &command); 00043 }; 00044 00045 }