ai/testing/stage_fallback.hpp

Go to the documentation of this file.
00001 /* $Id: stage_fallback.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  * Stage: fallback to other AI
00018  * @file
00019  */
00020 
00021 #ifndef AI_TESTING_STAGE_FALLBACK_HPP_INCLUDED
00022 #define AI_TESTING_STAGE_FALLBACK_HPP_INCLUDED
00023 
00024 #include "../composite/stage.hpp"
00025 #include "../interface.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 fallback_to_other_ai: public stage {
00038 public:
00039     fallback_to_other_ai( ai_context &context, const config &cfg );
00040 
00041     ~fallback_to_other_ai();
00042 
00043     bool do_play_stage();
00044 
00045     void on_create();
00046 
00047     config to_config() const;
00048 
00049 private:
00050     const config &cfg_;
00051 
00052     ai_ptr fallback_ai_;
00053 };
00054 
00055 } // end of namespace testing_ai_default
00056 
00057 } // end of namespace ai
00058 
00059 #ifdef _MSC_VER
00060 #pragma warning(pop)
00061 #endif
00062 
00063 #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