Rearranged the logic

This commit is contained in:
Kayne Ruse
2013-08-24 23:20:43 +10:00
parent 0a0b61287e
commit 7458962ad4
12 changed files with 234 additions and 121 deletions
+33
View File
@@ -0,0 +1,33 @@
#ifndef BASEROOM_HPP_
#define BASEROOM_HPP_
#include "mail_box.hpp"
#include <map>
#include <string>
class BaseRoom {
public:
BaseRoom(std::map<std::string, std::string> args);
~BaseRoom() = default;
virtual void Init() = 0;
virtual void Loop() = 0;
virtual void Quit() = 0;
bool SetRunning(bool b) { return running = b; }
bool GetRunning() const { return running; }
MailBox* GetMailBox() { return& mailBox; }
protected:
std::map<std::string, std::string> const arguments;
MailBox mailBox;
private:
bool running = true;
};
int roomThread(void*);
#endif