NITE 1.5.1 - API Reference

XnVMessageGenerator Class Reference

#include <XnVMessageGenerator.h>

Inheritance diagram for XnVMessageGenerator:

List of all members.

Public Member Functions

 XnVMessageGenerator (const XnChar *strName="XnVMessageGenerator")
virtual ~XnVMessageGenerator ()
XnVHandle AddListener (XnVMessageListener *pListener)
XnVMessageListenerRemoveListener (XnVHandle hListener)
XnVMessageListenerRemoveListener (XnVMessageListener *pListener)
void Generate (XnVMessage *pMessage)
void ClearAllQueues ()
const XnChar * GetGeneratorName () const

Protected Member Functions

void OpenNewSession (XnVMessageListener *pListener)
void CloseOldSession (XnVMessageListener *pListener)

Protected Attributes

XnVIntMessageListenerHash * m_phListeners
XnStringsHash * m_pProperties
XnVHandle m_hNextAvailable
XnChar * m_strGeneratorName

Detailed Description

A XnVMessageGenerator knows how to generate messages. Message Listeners register to it, and receive its Messages.

Definition at line 23 of file XnVMessageGenerator.h.


Constructor & Destructor Documentation

XnVMessageGenerator::XnVMessageGenerator ( const XnChar *  strName = "XnVMessageGenerator")

Constructor. Create a new Message Generator

Parameters:
[in]strNameName of the control, for log purposes.
virtual XnVMessageGenerator::~XnVMessageGenerator ( ) [virtual]

Member Function Documentation

XnVHandle XnVMessageGenerator::AddListener ( XnVMessageListener pListener)

Add a Listener to the Generator

Parameters:
[in]pListenerThe listener to add
Returns:
A handle to the listener, to allow removing it
void XnVMessageGenerator::ClearAllQueues ( )

Clear the Multi-thread queue for all listeners

void XnVMessageGenerator::CloseOldSession ( XnVMessageListener pListener) [protected]
void XnVMessageGenerator::Generate ( XnVMessage pMessage)

Send the Message to all registered Listeners

Parameters:
[in]pMessageThe Message to send
const XnChar* XnVMessageGenerator::GetGeneratorName ( ) const

Get the generator's name (for Log purposes)

Returns:
The generator's name
void XnVMessageGenerator::OpenNewSession ( XnVMessageListener pListener) [protected]
XnVMessageListener* XnVMessageGenerator::RemoveListener ( XnVMessageListener pListener)

Remove a listener from the generator

Parameters:
[in]pListenerThe listener to remove
Returns:
The listener that was removed, or NULL if the listener was never added
XnVMessageListener* XnVMessageGenerator::RemoveListener ( XnVHandle  hListener)

Remove a listener from the generator

Parameters:
[in]hListenerThe handle of the listener to remove
Returns:
The listener that was removed, or NULL if the handle was invalid

Member Data Documentation

XnVIntMessageListenerHash* XnVMessageGenerator::m_phListeners [protected]

Definition at line 81 of file XnVMessageGenerator.h.

XnStringsHash* XnVMessageGenerator::m_pProperties [protected]

Definition at line 82 of file XnVMessageGenerator.h.

Definition at line 85 of file XnVMessageGenerator.h.


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