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