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

#include <OpenNI.h>

Inheritance diagram for openni::OpenNI::DeviceDisconnectedListener:
Inheritance graph
[legend]

Public Member Functions

 DeviceDisconnectedListener ()
 
virtual void onDeviceDisconnected (const DeviceInfo *)=0
 
virtual ~DeviceDisconnectedListener ()
 

Static Private Member Functions

static void ONI_CALLBACK_TYPE deviceDisconnectedCallback (const OniDeviceInfo *pInfo, void *pCookie)
 

Private Attributes

OniDeviceCallbacks m_deviceDisconnectedCallbacks
 
OniCallbackHandle m_deviceDisconnectedCallbacksHandle
 

Friends

class OpenNI
 

Detailed Description

The OpenNI::DeviceDisconnectedListener class provides a means of registering for, and responding to when a device is disconnected.

onDeviceDisconnected is called when a device is removed from the system. Note that once a device is removed, if it was opened by a Device object, that object can no longer be used to access the device, even if it was reconnected. Once a device was reconnected, Device::open() should be called again in order to use this device.

To use this class, you should write a new class that inherits from it, and override the onDeviceDisconnected method. Once you instantiate your class, use the OpenNI::addDeviceDisconnectedListener() 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::removeDeviceDisconnectedListener() function is also provided, if you want to have your class stop listening to these events for any reason.

Definition at line 2057 of file OpenNI.h.

Constructor & Destructor Documentation

openni::OpenNI::DeviceDisconnectedListener::DeviceDisconnectedListener ( )
inline

Definition at line 2060 of file OpenNI.h.

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

Definition at line 2068 of file OpenNI.h.

Member Function Documentation

static void ONI_CALLBACK_TYPE openni::OpenNI::DeviceDisconnectedListener::deviceDisconnectedCallback ( const OniDeviceInfo pInfo,
void *  pCookie 
)
inlinestaticprivate

Definition at line 2082 of file OpenNI.h.

virtual void openni::OpenNI::DeviceDisconnectedListener::onDeviceDisconnected ( const DeviceInfo )
pure virtual

Callback function for the onDeviceDisconnected event. This function will be called whenever this event occurs. When this happens, a pointer to the DeviceInfo object for the newly disconnected device will be supplied. Note that once a device is removed, if it was opened by a Device object, that object can no longer be used to access the device, even if it was reconnected. Once a device was reconnected, Device::open() should be called again in order to use this device.

Implemented in astra_wrapper::AstraDeviceListener.

Friends And Related Function Documentation

friend class OpenNI
friend

Definition at line 2088 of file OpenNI.h.

Member Data Documentation

OniDeviceCallbacks openni::OpenNI::DeviceDisconnectedListener::m_deviceDisconnectedCallbacks
private

Definition at line 2089 of file OpenNI.h.

OniCallbackHandle openni::OpenNI::DeviceDisconnectedListener::m_deviceDisconnectedCallbacksHandle
private

Definition at line 2090 of file OpenNI.h.


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


astra_camera
Author(s): Tim Liu
autogenerated on Wed Dec 16 2020 03:54:34