Created
November 7, 2011 23:26
-
-
Save leffuy/1346525 to your computer and use it in GitHub Desktop.
Additions made from work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Class: Master Control Implementation | |
//Author: Stevie | |
//Description: Use this class as the main implementation of the master control | |
//and aggregate mini-kernel. Place extensions here if needed. | |
#include <vector.h> | |
class MasterControlImpl: public MasterControl{ | |
public: | |
//Queue control | |
virtual void pumpQueue(); | |
virtual void pushToQueue(BaseEvent* event); | |
virtual void dumpQueue(); | |
//Controller aggregation and assignment | |
virtual int addController(BaseController* controller); | |
virtual void removeController(int iD); | |
//the two master controllers | |
virtual void assignRender(int (*renderFunc)(void)); | |
virtual void assignFrame(int (*frameFunc)(void)); | |
//hillside | |
virtual void registerController(BaseEvent* event, int iD); | |
virtual void unregisterController(int iD); | |
private: | |
std::vector<BaseEvent*> eventQueue; | |
std::vector<BaseController*> controllerRegistry; | |
std::vector<RegistryEntry> indexRegistry; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This class is just a hack until there is a better way of doing key value | |
//stores in memory with sufficient abstraction and efficiency, and not a | |
//sacrifice between the two | |
class RegistryEntry{ | |
public: | |
RegistryEntry(int controlID, int eventID); | |
int getControlID(); | |
int getEventID(); | |
private: | |
static int controlID = 0; | |
static int eventID = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment