Rewrite planemap and idalloc in pure C++
This commit is contained in:
31
luprex/syscpp/world.hpp
Normal file
31
luprex/syscpp/world.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// Note about header file dependencies:
|
||||
//
|
||||
// world.hpp contains a lot of forward declarations.
|
||||
// That's because it is at the bottom of the dependency stack:
|
||||
// everyone includes world.hpp.
|
||||
//
|
||||
// However, world.cpp is at the top of the dependency stack,
|
||||
// it includes everyone else.
|
||||
//
|
||||
|
||||
#ifndef WORLD_HPP
|
||||
#define WORLD_HPP
|
||||
|
||||
#include "luastack.hpp"
|
||||
#include <memory>
|
||||
|
||||
class IdGlobalPool;
|
||||
|
||||
class World {
|
||||
public:
|
||||
int id_;
|
||||
std::unique_ptr<IdGlobalPool> id_pool_;
|
||||
|
||||
World() : id_(0) {};
|
||||
~World();
|
||||
|
||||
static void init(lua_State *L);
|
||||
static World *fetch(lua_State *L);
|
||||
};
|
||||
|
||||
#endif // WORLD_HPP
|
||||
Reference in New Issue
Block a user