00001 #ifndef actasp_MultiPolicy_h__guard 00002 #define actasp_MultiPolicy_h__guard 00003 00004 #include <actasp/AnswerSet.h> 00005 #include <actasp/AspFluent.h> 00006 #include <actasp/state_utils.h> 00007 00008 #include <set> 00009 #include <map> 00010 #include <stdexcept> 00011 00012 namespace actasp { 00013 00014 class MultiPolicy { 00015 public: 00016 00017 MultiPolicy(const ActionSet& actions); 00018 00019 ActionSet actions(const std::set<AspFluent>& state) const throw(); 00020 00021 void merge(const AnswerSet& plan) throw(std::logic_error); 00022 void merge(const MultiPolicy& otherPolicy); 00023 00024 bool empty()const throw(); 00025 00026 private: 00027 std::map<std::set<AspFluent>, ActionSet, StateComparator<AspFluent> > policy; 00028 ActionSet allActions; 00029 00030 }; 00031 00032 } 00033 00034 #endif