~bluebit/anakha/trunk

« back to all changes in this revision

Viewing changes to include/LUAManager.h

  • Committer: Jonas Erlandsson
  • Date: 2011-07-17 17:19:07 UTC
  • mfrom: (8.1.12 anakha)
  • Revision ID: more.room@gmail.com-20110717171907-fc83dx009xwce5ye
Post merge: Added support for John Torjo's Straightforward Settings Library ... Some restructuring to bring old files in to the new folder structure ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
// Lua
8
8
extern "C" {
9
 
        /* Remove this later
 
9
        /*
10
10
        #include "../lua-5.1.4-2/src/lua.h"
11
11
        #include "../lua-5.1.4-2/src/lualib.h"
12
12
        #include "../lua-5.1.4-2/src/lauxlib.h"
16
16
        #include "lauxlib.h"
17
17
}
18
18
 
19
 
//#include "../luabind-0.9.1/luabind/luabind.hpp" 
20
 
#include <luabind/luabind.hpp>
 
19
//#include "../luabind-0.9.1/luabind/luabind.hpp"
 
20
#include "luabind.hpp"
21
21
 
22
22
class LUAManager {
23
23
        public:
24
24
                static LUAManager* getInstance();
25
25
                virtual ~LUAManager();
26
26
 
27
 
                void load(const std::string fileName);
 
27
                void call_function(std::string);
 
28
                // lua_CFunction = int (*lua_CFunction) (lua_State *L)
 
29
                void exportFunction(lua_CFunction fun, std::string fun_name);
 
30
 
28
31
        protected:
29
32
        private:
30
 
                LUAManager();                                  // Private constructor
 
33
                LUAManager();                               // Private constructor
31
34
                LUAManager(const LUAManager&);                 // Prevent copy-construction
32
35
                LUAManager& operator=(const LUAManager&);      // Prevent assignment
33
 
 
34
 
                void init();                                                                    // Run from getInstance()                       
 
36
                bool load(std::string fname);
 
37
                bool init();
35
38
 
36
39
                static LUAManager* instance;
37
40
                lua_State *scriptEnv;