diff options
author | truebrain <truebrain@openttd.org> | 2011-11-29 23:21:52 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-29 23:21:52 +0000 |
commit | e37149a1def6a0e63dda8e0964abf1b82316761a (patch) | |
tree | d8f80cee8a3b1eb60feb883796e43300fb50cfb1 /src/script/script_info.hpp | |
parent | ae8540f5e080adebca3e54c69aa7cd85a87e550b (diff) | |
download | openttd-e37149a1def6a0e63dda8e0964abf1b82316761a.tar.xz |
(svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary
Diffstat (limited to 'src/script/script_info.hpp')
-rw-r--r-- | src/script/script_info.hpp | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/src/script/script_info.hpp b/src/script/script_info.hpp index ad30bf756..c19478116 100644 --- a/src/script/script_info.hpp +++ b/src/script/script_info.hpp @@ -15,9 +15,9 @@ #include <squirrel.h> #include "../misc/countedptr.hpp" -class ScriptFileInfo : public SimpleCountedObject { +class ScriptInfo : public SimpleCountedObject { public: - ScriptFileInfo() : + ScriptInfo() : SQ_instance(NULL), main_script(NULL), tar_file(NULL), @@ -28,9 +28,10 @@ public: date(NULL), instance_name(NULL), version(0), - url(NULL) + url(NULL), + scanner(NULL) {} - ~ScriptFileInfo(); + ~ScriptInfo(); /** * Get the Author of the script. @@ -90,22 +91,30 @@ public: /** * Process the creation of a FileInfo object. */ - static SQInteger Constructor(HSQUIRRELVM vm, ScriptFileInfo *info); + static SQInteger Constructor(HSQUIRRELVM vm, ScriptInfo *info); + + /** + * Get the scanner which has found this ScriptInfo. + */ + virtual class ScriptScanner *GetScanner() { return this->scanner; } protected: - class Squirrel *engine; - HSQOBJECT *SQ_instance; + class Squirrel *engine; ///< Engine used to register for Squirrel. + HSQOBJECT *SQ_instance; ///< The Squirrel instance created for this info. + private: - char *main_script; - char *tar_file; - const char *author; - const char *name; - const char *short_name; - const char *description; - const char *date; - const char *instance_name; - int version; - const char *url; + char *main_script; ///< Name of the main script. + char *tar_file; ///< If, which tar file the script was in. + const char *author; ///< Author of the script. + const char *name; ///< Full name of the script. + const char *short_name; ///< Short name (4 chars) which uniquely identifies the script. + const char *description; ///< Small description of the script. + const char *date; ///< The date the script was written at. + const char *instance_name; ///< Which instance name the script has. + int version; ///< Version of the script. + const char *url; ///< URL of the script. + + class ScriptScanner *scanner; ///< ScriptScanner object that was used to scan this script info. }; #endif /* SCRIPT_INFO_HPP */ |