Advertisement Jump to content
Sign in to follow this  
fir

event distributor/switch/dispatcher

This topic is 1781 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use this construct in my winapi code 

 

When i got winapi events (for example keydown, mousemove etc)

i often need it to be serviced in a couple of different places not only

one; for example mouse move can call some code in main game module but also in the hud module or yet maybe in some debug module 

- i mean mouse move will call thre handlers here

 

so i did some stuff like a table of pointers which can be registered 

(in this table) from each my module code who want use this, and called

in 'top' event handler routine - I mean i did some code to register 

some subhandlers to one top/main event handler (this is wnd proc

stuff)

 

This is working ok,

I got only terminological problem here, could someone tell me which name

for this code (this is separate file-module which hold the pointer tables and 

exposes function to register subevents) would be good or okay?

 

can i call it 'event switch' or 'event dispatcher' or 'event distributor'? 

(I like to have some good names becouse this really is important imo)

maybe someone also used this way and got some (specyfic or general) advices or opinions on this construct/solution he could share?

 

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!