OpenNI 1.5.7
Public Member Functions | Friends | List of all members

#include <XnCppWrapper.h>

Inheritance diagram for xn::NodeWrapper:
Inheritance graph
[legend]

Public Member Functions

 NodeWrapper (XnNodeHandle hNode)
 
 NodeWrapper (const NodeWrapper &other)
 
NodeWrapperoperator= (const NodeWrapper &other)
 
 ~NodeWrapper ()
 
 operator XnNodeHandle () const
 
XnNodeHandle GetHandle () const
 
XnBool operator== (const NodeWrapper &other)
 
XnBool operator!= (const NodeWrapper &other)
 
XnBool IsValid () const
 
const XnChar * GetName () const
 
XnStatus AddRef ()
 
void Release ()
 
void SetHandle (XnNodeHandle hNode)
 
void TakeOwnership (XnNodeHandle hNode)
 

Friends

class Context
 

Detailed Description

Purpose: The NodeWrapper class is the base class for all OpenNI production node classes in C++, for example, the xn::ProductionNode class and the xn::Generator class.

The NodeWrapper class is the C++ API wrapper around the OpenNI C XnNodeHandle API.

Remarks:

A fundamental OpenNI concept that is critical to understand about nodes and node creation is that all C++ objects are "smart pointers" to the actual nodes. The reason why OpenNI is designed this way is so that the same node can be used to produce data (or provide information) for more than just one (dependant) node or for more than just one software component.

When instantiating an object of this class, it doesn't point to any actual node. In order to create an actual node, use one of the Create() methods (e.g. DepthGenerator::Create()).

Constructor & Destructor Documentation

◆ NodeWrapper() [1/2]

xn::NodeWrapper::NodeWrapper ( XnNodeHandle  hNode)
inline

Ctor

Parameters
[in]hNodeA node handle.

◆ NodeWrapper() [2/2]

xn::NodeWrapper::NodeWrapper ( const NodeWrapper other)
inline

◆ ~NodeWrapper()

xn::NodeWrapper::~NodeWrapper ( )
inline

Member Function Documentation

◆ AddRef()

XnStatus xn::NodeWrapper::AddRef ( )
inline

References a production node, increasing its reference count by 1. For full details and usage, see xnProductionNodeAddRef

◆ GetHandle()

XnNodeHandle xn::NodeWrapper::GetHandle ( ) const
inline

Gets the underlying C handle.

◆ GetName()

const XnChar * xn::NodeWrapper::GetName ( ) const
inline

◆ IsValid()

XnBool xn::NodeWrapper::IsValid ( ) const
inline

This method checks that this object points to an actual node (that has been 'created') and does not point to NULL.

Returns TRUE if the object points to a node, i.e., the node has been 'created'; FALSE otherwise.

Remarks

This method is a very important for managing nodes in the production graph. This check is concerned with the stage before actually creating the node, i.e., before invoking the node's Create() method.

◆ operator XnNodeHandle()

xn::NodeWrapper::operator XnNodeHandle ( ) const
inline

◆ operator!=()

XnBool xn::NodeWrapper::operator!= ( const NodeWrapper other)
inline

Checks if two node references do not point to the same actual node.

Parameters
[in]otherAnother object

◆ operator=()

NodeWrapper & xn::NodeWrapper::operator= ( const NodeWrapper other)
inline

◆ operator==()

XnBool xn::NodeWrapper::operator== ( const NodeWrapper other)
inline

Checks if two node references point to the same actual node

Parameters
[in]otherAnother object

◆ Release()

void xn::NodeWrapper::Release ( )
inline

Unreference a production node, decreasing its reference count by 1. If the reference count reaches zero, the node will be destroyed.

◆ SetHandle()

void xn::NodeWrapper::SetHandle ( XnNodeHandle  hNode)
inline

Replaces the object being pointed.

◆ TakeOwnership()

void xn::NodeWrapper::TakeOwnership ( XnNodeHandle  hNode)
inline

Friends And Related Symbol Documentation

◆ Context

friend class Context
friend

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