Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
openni::OpenNI::DeviceStateChangedListener Class Referenceabstract

#include <OpenNI.h>

Public Member Functions

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

Static Private Member Functions

static void ONI_CALLBACK_TYPE deviceStateChangedCallback (const OniDeviceInfo *pInfo, OniDeviceState state, void *pCookie)
 

Private Attributes

OniDeviceCallbacks m_deviceStateChangedCallbacks
 
OniCallbackHandle m_deviceStateChangedCallbacksHandle
 

Friends

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.

Definition at line 2058 of file OpenNI.h.

Constructor & Destructor Documentation

openni::OpenNI::DeviceStateChangedListener::DeviceStateChangedListener ( )
inline

Definition at line 2061 of file OpenNI.h.

virtual openni::OpenNI::DeviceStateChangedListener::~DeviceStateChangedListener ( )
inlinevirtual

Definition at line 2069 of file OpenNI.h.

Member Function Documentation

static void ONI_CALLBACK_TYPE openni::OpenNI::DeviceStateChangedListener::deviceStateChangedCallback ( const OniDeviceInfo pInfo,
OniDeviceState  state,
void *  pCookie 
)
inlinestaticprivate

Definition at line 2081 of file OpenNI.h.

virtual void openni::OpenNI::DeviceStateChangedListener::onDeviceStateChanged ( const DeviceInfo ,
DeviceState   
)
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

Definition at line 2087 of file OpenNI.h.

Member Data Documentation

OniDeviceCallbacks openni::OpenNI::DeviceStateChangedListener::m_deviceStateChangedCallbacks
private

Definition at line 2088 of file OpenNI.h.

OniCallbackHandle openni::OpenNI::DeviceStateChangedListener::m_deviceStateChangedCallbacksHandle
private

Definition at line 2089 of file OpenNI.h.


The documentation for this class was generated from the following file:


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:39