Wrote ManagerInterface, implemented it in RoomManager

ManagerInterface is a server-side pure abstract class; all of it's methods
are defined as pure virtual methods, and as such should be defined in the
derived classes. It works correctly along side the Singleton class, but
does not implement it directly as originally planned. It should also
support variadic parameters, which still need testing.

I've implemented ManagerInterface in RoomManager, but I've also disabled a
number of the RoomManager's features, including the lua interface. The
project as a whole should build, but it won't run correctly. The variadic
parameters will be tested using the other managers.

It feels good just playing around instead of pushing forward all the time.
This commit is contained in:
Kayne Ruse
2014-10-07 00:55:55 +11:00
parent 76206a1146
commit 5a42a7e36c
6 changed files with 136 additions and 58 deletions
+5 -5
View File
@@ -24,7 +24,7 @@
#include "room_manager.hpp"
#include <string>
/*
static int getRoom(lua_State* L) {
//find, push and return the room
RoomData* room = RoomManager::GetSingleton().GetRoom(lua_tointeger(L, -2));
@@ -46,11 +46,11 @@ static int unloadRoom(lua_State* L) {
RoomManager::GetSingleton().UnloadRoom(lua_tointeger(L, -2));
return 0;
}
*/
static const luaL_Reg roomManagerLib[] = {
{"GetRoom",getRoom},
{"CreateRoom",createRoom},
{"UnloadRoom",unloadRoom},
// {"GetRoom",getRoom},
// {"CreateRoom",createRoom},
// {"UnloadRoom",unloadRoom},
{nullptr, nullptr}
};