execution_observer_utils.h
Go to the documentation of this file.
00001 
00002 #ifndef actasp_execution_observer_utiles_h__guard
00003 #define actasp_execution_observer_utiles_h__guard
00004 
00005 #include <actasp/AspFluent.h>
00006 #include <actasp/ExecutionObserver.h>
00007 
00008 namespace actasp {
00009 
00010   
00011 struct NotifyActionTermination {
00012   
00013   NotifyActionTermination(const AspFluent& action) : action(action) {}
00014   
00015   void operator()(ExecutionObserver *observer) {
00016     observer->actionTerminated(action);
00017   }
00018   
00019   AspFluent action;
00020 };
00021 
00022 struct NotifyActionStart {
00023   
00024   NotifyActionStart(const AspFluent& action) : action(action) {}
00025   
00026   void operator()(ExecutionObserver *observer) {
00027     observer->actionStarted(action);
00028   }
00029   
00030   AspFluent action;
00031 };
00032 
00033 struct NotifyGoalChanged {
00034   
00035   NotifyGoalChanged(const std::vector<actasp::AspRule>& goalRules) : goalRules(goalRules) {}
00036   
00037   void operator()(ExecutionObserver *observer) {
00038     observer->goalChanged(goalRules);
00039   }
00040   
00041   const std::vector<actasp::AspRule>& goalRules;
00042 };
00043 
00044 
00045 }
00046 
00047 #endif


bwi_kr_execution
Author(s): Matteo Leonetti, Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:37