Created
July 21, 2013 17:01
-
-
Save Groogy/6049151 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 BaseSubscriberInterface | |
{ | |
publlic: | |
/* stuff */ | |
}; | |
class DerivedSubscriber : public BaseSubscriberInterface | |
{ | |
public: | |
void funcThatReceivesMessage(const Message& message); | |
}; | |
DerivedSubscriber* subscriber = new DerivedSubscriber(); | |
server.subscribe(messageType, subscriber, &DerivedSubscriber::funcThatReceivesMessage); // <- server does not know about DerivedSubscriber | |
server.sendMessages() // <- does subscriber->(*funcPtr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment