#ifndef LUA_MANAGER_H #define LUA_MANAGER_H #include #include #include #include #include namespace battleship{ class LuaManager{ public: struct Index{ std::string index; bool string; Index(std::string index, bool string){ this->index = index; this->string = string; } }; static LuaManager* getSingleton(); inline lua_State* getState(){return state;} void readFile(std::string); int getInt(std::string); int getIntFromTable(std::string, std::vector); float getFloatFromTable(std::string, std::vector); std::string getStringFromTable(std::string, std::vector); private: LuaManager(); void prepareTableForRetrieval(std::string, std::vector&); lua_State *state = nullptr; }; } #endif