Beginning to create the placeholder classes

This commit is contained in:
Kayne Ruse
2013-08-29 19:57:25 +10:00
parent d5f7363c33
commit b675f516e7
13 changed files with 135 additions and 50 deletions
+6 -21
View File
@@ -1,36 +1,21 @@
#ifndef SERVERAPPLICATION_HPP_
#define SERVERAPPLICATION_HPP_
#include "base_room.hpp"
#include "SDL/SDL_thread.h"
#include <list>
#include <map>
#include <string>
struct RoomHandle {
SDL_Thread* thread = nullptr;
BaseRoom* room = nullptr;
};
//The main application class
class ServerApplication {
public:
private:
ServerApplication();
~ServerApplication();
static ServerApplication instance;
public:
static ServerApplication* GetInstance() { return &instance; }
void Init();
void Loop();
void Quit();
bool SetRunning(bool b) { return running = b; }
bool GetRunning() const { return running; }
private:
void OpenRoom(std::map<std::string, std::string>);
void CloseRoom(RoomHandle);
std::list<RoomHandle> rooms;
bool running = true;
};