UGDK
src/ugdk/script/languages/lua/bootstrapgear.h
Go to the documentation of this file.
00001 
00002 #ifndef UGDK_SCRIPT_LUA_BOOTSTRAPGEAR_H_
00003 #define UGDK_SCRIPT_LUA_BOOTSTRAPGEAR_H_
00004 
00005 #include <vector>
00006 
00007 #include <ugdk/script/languages/lua/header.h>
00008 #include <ugdk/script/languages/lua/basegear.h>
00009 #include <ugdk/script/languages/lua/state.h>
00010 
00011 #include <ugdk/script/langwrapper.h>
00012 #include <ugdk/script/module.h>
00013 
00014 namespace ugdk {
00015 namespace script {
00016 namespace lua {
00017 
00018 class DataGear;
00019 
00020 typedef ugdk::script::Module<lua_CFunction> LuaModule;
00021 typedef const std::vector<LuaModule> ModuleList;
00022 
00023 class BootstrapGear : public BaseGear {
00024 
00025   public:
00026 
00027     BootstrapGear() :
00028         BaseGear(NULL) {}
00029 
00030     ~BootstrapGear() {}
00031 
00032     bool Initialize(const ModuleList& modules);
00033 
00034     DataGear* NextGear();
00035 
00036     void Abort();
00037 
00038   private:
00039 
00040     static int SafeInitialize(lua_State* L);
00041 
00042     void LoadLibs();
00043 
00044     void PreloadModules(const ModuleList& modules);
00045 
00046 };
00047 
00048 } /* namespace lua */
00049 } /* namespace script */
00050 } /* namespace ugdk */
00051 
00052 #endif /* UGDK_SCRIPT_LUA_BOOTSTRAPGEAR_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines