BanTheRewind/Cinder-LeapSdk — pull request #6 by nselikoff (2013-08-21 14:41:56+00:00)
Title: Adding Leap event signals so that any number of classes can connect and respond to signals such as onConnect and onDisconnect

This is implemented in the style of Cinder's mouse and keyboard events, and the Cinder ListenerBasic sample.

To allow MyClass to listen to the Leap's onConnect event, for example, one would:

1. Add a private member variable of type `ci::signals::scoped_connection` to hold the connection
2. Pass in a `LeapSdk::DeviceRef` to the constructor
3. Connect a function to the signal

```cpp
MyClass::MyClass( LeapSdk::DeviceRef aDevice )
{
mCbLeapConnect = aDevice->getSignalLeapConnect().connect( std::bind( &MyClass::onLeapConnect, this ) );
}
```

Then when `LeapSdk::Listener::onConnect` is called, any other functions that have connected to this signal will also be called.

What do you think of this? Is it a sensible way to allow multiple classes to respond to onConnect and related Leap signals without them having to poll `LeapSdk::Device::isConnected` etc?

Also, there was a small typo in line 92 (sorry, should have done that as a separate commit).