script_info.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SCRIPT_INFO
00013 #define SCRIPT_INFO
00014
00015 #include <squirrel.h>
00016 #include "../misc/countedptr.hpp"
00017
00018 class ScriptFileInfo : public SimpleCountedObject {
00019 public:
00020 ScriptFileInfo() :
00021 SQ_instance(NULL),
00022 main_script(NULL),
00023 author(NULL),
00024 name(NULL),
00025 short_name(NULL),
00026 description(NULL),
00027 date(NULL),
00028 instance_name(NULL),
00029 version(0),
00030 url(NULL)
00031 {}
00032 ~ScriptFileInfo();
00033
00037 const char *GetAuthor() const { return this->author; }
00038
00042 const char *GetName() const { return this->name; }
00043
00047 const char *GetShortName() const { return this->short_name; }
00048
00052 const char *GetDescription() const { return this->description; }
00053
00057 int GetVersion() const { return this->version; }
00058
00062 const char *GetDate() const { return this->date; }
00063
00067 const char *GetInstanceName() const { return this->instance_name; }
00068
00072 const char *GetURL() const { return this->url; }
00073
00077 const char *GetMainScript() const { return this->main_script; }
00078
00082 bool CheckMethod(const char *name) const;
00083
00087 static SQInteger Constructor(HSQUIRRELVM vm, ScriptFileInfo *info);
00088
00089 protected:
00090 class Squirrel *engine;
00091 HSQOBJECT *SQ_instance;
00092 private:
00093 char *main_script;
00094 const char *author;
00095 const char *name;
00096 const char *short_name;
00097 const char *description;
00098 const char *date;
00099 const char *instance_name;
00100 int version;
00101 const char *url;
00102 };
00103
00104 #endif