ai_config.hpp

Go to the documentation of this file.
00001 /* $Id$ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef AI_CONFIG_HPP
00013 #define AI_CONFIG_HPP
00014 
00015 #include "../script/script_config.hpp"
00016 
00017 class AIConfig : public ScriptConfig {
00018 public:
00022   static AIConfig *GetConfig(CompanyID company, ScriptSettingSource source = SSS_DEFAULT);
00023 
00024   AIConfig() :
00025     ScriptConfig()
00026   {}
00027 
00028   AIConfig(const AIConfig *config) :
00029     ScriptConfig(config)
00030   {}
00031 
00032   class AIInfo *GetInfo() const;
00033 
00034   /* virtual */ int GetSetting(const char *name) const;
00035   /* virtual */ void SetSetting(const char *name, int value);
00036 
00045   bool ResetInfo(bool force_exact_match);
00046 
00047 protected:
00048   /* virtual */ void PushExtraConfigList();
00049   /* virtual */ void ClearConfigList();
00050   /* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
00051 };
00052 
00053 #endif /* AI_CONFIG_HPP */