- No modifications to a subscriber's interface are necessary (ie: doesn't need to define a specific method or implement any specific interface)
- Abstracts the manner in which messages are published to subscribers behind a common interface (ie: publish messages immediately, queue them up for delivery from a single thread, etc.)
- Easily allows subscribing for specific messages or entire groups of messages (ie: subscribing for the escape key versus subscribing for all keyboard messages)
- Type safety (subscribers will only receive messages of the C++ type they specified at subscription time)
- Doesn't rely on singletons or any other type of global state (more concurrency-friendly and allows localized subscriptions for better performance)
This first post will concentrate on the system's primary interfaces and won't delve into implementation very much. Subsequent posts will then go under the hood as well as describe some of the non-essential, but useful pieces of code. This post assumes some familiarity with templates as well as common Boost components such as Bind, Function, and Shared Pointer.
I've been working on an Android version of the CMP iPhone app and it was officially released to the Android Market yesterday. It was my first foray into Android development, so it's pretty cool to see people buying it. It was released under an exclusive license from the Civilian Marksmanship Program and a portion of every sale goes directly to the CMP. If you have an Android phone and want to try it out, just go to the "Market" app on your phone, search for "CMP", and download it!
Last week, I brought a coworker out for skeet who's also a talented photographer, and he snapped a few pictures. As you can see, I have a pretty unorthodox skeet gun, but I still consistently score 19 or 20 with it:
(sorry about the video quality...it was a bit too dark inside for the crappy phone camera)