00001 #ifndef bwi_krexec_ActionLogger_h__guard 00002 #define bwi_krexec_ActionLogger_h__guard 00003 00004 #include "actasp/ExecutionObserver.h" 00005 00006 #include <fstream> 00007 00008 namespace actasp { 00009 class PartialPolicy; 00010 } 00011 00012 struct ActionLogger : public actasp::ExecutionObserver { 00013 00014 ActionLogger(); 00015 00016 void actionStarted(const actasp::AspFluent& action) throw(); 00017 void actionTerminated(const actasp::AspFluent& action) throw(); 00018 00019 void setFile(const std::string& path); 00020 void taskCompleted(); 00021 00022 void goalChanged(std::vector<actasp::AspRule> newGoalRules) throw() {} 00023 void policyChanged(actasp::PartialPolicy* policy) throw() {} 00024 00025 ~ActionLogger(); 00026 00027 private: 00028 00029 std::ofstream *dest_file; 00030 }; 00031 00032 00033 00034 #endif