summaryrefslogtreecommitdiff
path: root/src/ai/ai_config.hpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-07-31 22:16:34 +0000
committeryexo <yexo@openttd.org>2010-07-31 22:16:34 +0000
commit6d4900ed7c1631c40aec59cab9c11881107456a5 (patch)
tree7e3bc6a621693ec52811f4bf50de8756f5db30dc /src/ai/ai_config.hpp
parent5b20472ccbae53f70e7528ecb7322c92690cffef (diff)
downloadopenttd-6d4900ed7c1631c40aec59cab9c11881107456a5.tar.xz
(svn r20271) -Doc: add doxygen comments to several items under src/ai/
Diffstat (limited to 'src/ai/ai_config.hpp')
-rw-r--r--src/ai/ai_config.hpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp
index 98e98263c..c5b7c7482 100644
--- a/src/ai/ai_config.hpp
+++ b/src/ai/ai_config.hpp
@@ -18,8 +18,12 @@
#include "../core/string_compare_type.hpp"
#include "../company_type.h"
+/**
+ * AI settings for one company slot.
+ */
class AIConfig {
private:
+ /** List with name=>value pairs of all AI-specific settings */
typedef std::map<const char *, int, StringCompare> SettingValueList;
public:
@@ -30,7 +34,14 @@ public:
config_list(NULL),
is_random_ai(false)
{}
+
+ /**
+ * Create a new AI config that is a copy of an existing config.
+ * @param config The object to copy.
+ */
AIConfig(const AIConfig *config);
+
+ /** Delete an AI configuration. */
~AIConfig();
/**
@@ -61,8 +72,10 @@ public:
*/
const AIConfigItemList *GetConfigList();
- /* Where to get the config from, either default (depends on current game
- * mode) or force either newgame or normal */
+ /**
+ * Where to get the config from, either default (depends on current game
+ * mode) or force either newgame or normal
+ */
enum AISettingSource {
AISS_DEFAULT, ///< Get the AI config from the current game mode
AISS_FORCE_NEWGAME, ///< Get the newgame AI config
@@ -131,12 +144,12 @@ public:
void SettingsToString(char *string, size_t size) const;
private:
- const char *name;
- int version;
- class AIInfo *info;
- SettingValueList settings;
- AIConfigItemList *config_list;
- bool is_random_ai;
+ const char *name; //!< Name of the AI
+ int version; //!< Version of the AI
+ class AIInfo *info; //!< AIInfo object for related to this AI version
+ SettingValueList settings; //!< List with all setting=>value pairs that are configure for this AI
+ AIConfigItemList *config_list; //!< List with all settings defined by this AI
+ bool is_random_ai; //!< True if the AI in this slot was randomly chosen.
};
#endif /* ENABLE_AI */