well, it compiles. and perhaps it sends an event. billiant.

This commit is contained in:
Bernhard Amann 2011-10-19 15:41:07 -07:00
parent 0eafeb0369
commit f8be3519c7
5 changed files with 63 additions and 7 deletions

View file

@ -1,5 +1,7 @@
#include "InputReader.h"
#include "EventRegistry.h"
#include "Event.h"
InputReader::InputReader()
{
@ -9,4 +11,21 @@ InputReader::InputReader()
InputReader::~InputReader()
{
}
void InputReader::Error(const char *msg)
{
input_mgr->Error(this, msg);
}
bool InputReader::Init(string source, string eventName) {
EventHandler* handler = event_registry->Lookup(eventName.c_str());
if ( handler == 0 ) {
reporter->Error("Event %s not found", eventName.c_str());
return false;
}
mgr.Dispatch(new Event(handler, 0));
return true;
}