00001 #include <vigir_footstep_planning_plugins/plugin_aggregators/state_generator.h> 00002 00003 00004 00005 namespace vigir_footstep_planning 00006 { 00007 StateGenerator::StateGenerator() 00008 : ExtendedPluginAggregator<StateGenerator, StateGeneratorPlugin>("StateGenerator") 00009 { 00010 } 00011 00012 std::list<PlanningState::Ptr> StateGenerator::generatePredecessor(const PlanningState& state) const 00013 { 00014 std::list<PlanningState::Ptr> result; 00015 00016 for (StateGeneratorPlugin::Ptr plugin : getPlugins()) 00017 { 00018 if (plugin) 00019 result.splice(result.end(), plugin->generatePredecessor(state)); 00020 } 00021 00022 return result; 00023 } 00024 00025 std::list<PlanningState::Ptr> StateGenerator::generateSuccessor(const PlanningState& state) const 00026 { 00027 std::list<PlanningState::Ptr> result; 00028 00029 for (StateGeneratorPlugin::Ptr plugin : getPlugins()) 00030 { 00031 if (plugin) 00032 result.splice(result.end(), plugin->generateSuccessor(state)); 00033 } 00034 00035 return result; 00036 } 00037 }