Created
December 10, 2012 14:28
-
-
Save adurpas/4250856 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
| #include <SubscriberId.hpp> | |
| namespace details | |
| { | |
| SubscriberId::SubscriberId(osapi::MsgQueue* mq, unsigned long id) | |
| { | |
| /* Make your own implementation here... */ | |
| // New code starts | |
| mq_ = mq; | |
| id_ = id; | |
| // New code ends | |
| } | |
| /** Send the message to the subscriber | |
| */ | |
| void SubscriberId::send(osapi::Message* m) const | |
| { | |
| /* What do you do when you want to send to a receiver? | |
| What do you need to know? */ | |
| // New code starts | |
| mq_->send(id_, m); | |
| // New code ends | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment