ai/testing/stage_rca.hpp

Go to the documentation of this file.
00001 /* $Id: stage_rca.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2009 - 2012 by Yurii Chernyi <terraninfo@terraninfo.net>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 /**
00017  * @file
00018  * candidate action evaluator
00019  */
00020 
00021 #ifndef AI_TESTING_STAGE_RCA_HPP_INCLUDED
00022 #define AI_TESTING_STAGE_RCA_HPP_INCLUDED
00023 
00024 #include "../composite/rca.hpp"
00025 #include "../composite/stage.hpp"
00026 
00027 #ifdef _MSC_VER
00028 #pragma warning(push)
00029 //silence "inherits via dominance" warnings
00030 #pragma warning(disable:4250)
00031 #endif
00032 
00033 namespace ai {
00034 
00035 namespace testing_ai_default {
00036 
00037 class candidate_action_evaluation_loop: public virtual stage, public virtual rca_context {
00038 public:
00039     candidate_action_evaluation_loop( ai_context &context, const config &cfg );
00040 
00041     ~candidate_action_evaluation_loop();
00042 
00043     bool do_play_stage();
00044 
00045     void on_create();
00046 
00047     config to_config() const;
00048 
00049     rca_context& get_rca_context();
00050 
00051     void create_candidate_action(std::vector<candidate_action_ptr> &candidate_actions, const config &cfg);
00052 
00053     void remove_completed_cas();
00054 
00055 private:
00056     std::vector<candidate_action_ptr> candidate_actions_;
00057 
00058     const config &cfg_;
00059 };
00060 
00061 
00062 } // of namespace testing_ai_default
00063 
00064 } // of namespace ai
00065 
00066 #ifdef _MSC_VER
00067 #pragma warning(pop)
00068 #endif
00069 
00070 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:02:45 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs