Mercurial > LightClone
view LightClone/Source/EventSystem.h @ 15:ee1c2510096d
Work on GUI system
author | koryspansel <koryspansel@bendbroadband.com> |
---|---|
date | Wed, 14 Sep 2011 11:04:18 -0700 |
parents | 7081e8e6008c |
children |
line wrap: on
line source
/* * EventSystem */ #ifndef __EVENTSYSTEM_H__ #define __EVENTSYSTEM_H__ #include "Core.h" #include "EventSource.h" #include "EventSink.h" #include "Event.h" /* * EventSystem * The system ties together event sources and event sinks, and provides an * interface to the system for registering these objects. */ class EventSystem { /* * kSources */ EventSourceList kSources; /* * kSinks */ EventSinkList kSinks; public: /* * EventSystem */ EventSystem(); /* * AddSource */ ErrorCode AddSource(EventSource* pSource); /* * AddSink * TODO: This should support specifying a specific event */ ErrorCode AddSink(EventSink* pSink); /* * RemoveSink */ ErrorCode RemoveSink(EventSink* pSink); /* * Post */ void Post(const Event& kEvent); /* * Update */ virtual void Update(float fElapsed); }; #endif //__EVENTSYSTEM_H__