OpenNI 2.0: openni::OpenNI::DeviceStateChangedListener Class Reference

OpenNI 2.0

openni::OpenNI::DeviceStateChangedListener Class Reference

#include <OpenNI.h>

List of all members.

Public Member Functions

 DeviceStateChangedListener ()
virtual ~DeviceStateChangedListener ()
virtual void onDeviceStateChanged (const DeviceInfo *, DeviceState)=0


class OpenNI

Detailed Description

The OpenNI::DeviceStateChangedListener class provides a means of registering for, and responding to when a device's state is changed.

onDeviceStateChanged is triggered whenever the state of a connected device is changed.

To use this class, you should write a new class that inherits from it, and override the onDeviceStateChanged method. Once you instantiate your class, use the OpenNI::addDeviceStateChangedListener() function to add your listener object to OpenNI's list of listeners. Your handler function will then be called whenever the event occurs. A OpenNI::removeDeviceStateChangedListener() function is also provided, if you want to have your class stop listening to these events for any reason.

Constructor & Destructor Documentation

openni::OpenNI::DeviceStateChangedListener::DeviceStateChangedListener ( ) [inline]
virtual openni::OpenNI::DeviceStateChangedListener::~DeviceStateChangedListener ( ) [inline, virtual]

Member Function Documentation

virtual void openni::OpenNI::DeviceStateChangedListener::onDeviceStateChanged ( const DeviceInfo ,
) [pure virtual]

Callback function for the onDeviceStateChanged event. This function will be called whenever this event occurs. When this happens, a pointer to a DeviceInfo object for the affected device will be supplied, as well as the new DeviceState value of that device.

Friends And Related Function Documentation

friend class OpenNI [friend]

The documentation for this class was generated from the following file:
Generated on Tue Nov 12 2013 16:10:45 for OpenNI 2.0 by   doxygen