OpenNI 1.0.0

xn::Context Class Reference

#include <XnCppWrapper.h>

List of all members.

Public Member Functions

 Context ()
 Context (XnContext *pContext)
 Context (const Context &other)
 ~Context ()
XnContextGetUnderlyingObject () const
XnStatus Init ()
XnStatus RunXmlScript (const XnChar *strScript, EnumerationErrors *pErrors=NULL)
XnStatus RunXmlScriptFromFile (const XnChar *strFileName, EnumerationErrors *pErrors=NULL)
XnStatus InitFromXmlFile (const XnChar *strFileName, EnumerationErrors *pErrors=NULL)
XnStatus OpenFileRecording (const XnChar *strFileName)
XnStatus CreateMockNode (XnProductionNodeType type, const XnChar *strName, ProductionNode &node)
XnStatus CreateMockNodeBasedOn (ProductionNode &originalNode, const XnChar *strName, ProductionNode &mockNode)
XnStatus CreateCodec (XnCodecID codecID, ProductionNode &initializerNode, Codec &codec)
void Shutdown ()
XnStatus AddLicense (const XnLicense &License)
XnStatus EnumerateLicenses (XnLicense *&aLicenses, XnUInt32 &nCount) const
XnStatus EnumerateProductionTrees (XnProductionNodeType Type, Query *pQuery, NodeInfoList &TreesList, EnumerationErrors *pErrors=NULL) const
XnStatus CreateAnyProductionTree (XnProductionNodeType type, Query *pQuery, ProductionNode &node, EnumerationErrors *pErrors=NULL)
XnStatus CreateProductionTree (NodeInfo &Tree)
XnStatus EnumerateExistingNodes (NodeInfoList &list) const
XnStatus EnumerateExistingNodes (NodeInfoList &list, XnProductionNodeType type) const
XnStatus FindExistingNode (XnProductionNodeType type, ProductionNode &node) const
XnStatus GetProductionNodeByName (const XnChar *strInstanceName, ProductionNode &node) const
XnStatus GetProductionNodeInfoByName (const XnChar *strInstanceName, NodeInfo &nodeInfo) const
XnStatus StartGeneratingAll ()
XnStatus StopGeneratingAll ()
XnStatus SetGlobalMirror (XnBool bMirror)
XnBool GetGlobalMirror ()
XnStatus GetGlobalErrorState ()
XnStatus RegisterToErrorStateChange (XnErrorStateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
void UnregisterFromErrorStateChange (XnCallbackHandle hCallback)
XnStatus WaitAndUpdateAll ()
XnStatus WaitAnyUpdateAll ()
XnStatus WaitOneUpdateAll (ProductionNode &node)
XnStatus WaitNoneUpdateAll ()
XnStatus AutoEnumerateOverSingleInput (NodeInfoList &List, XnProductionNodeDescription &description, const XnChar *strCreationInfo, XnProductionNodeType InputType, EnumerationErrors *pErrors, Query *pQuery=NULL) const
void SetHandle (XnContext *pContext)

Static Public Member Functions

static void FreeLicensesList (XnLicense aLicenses[])

Detailed Description

Represents an OpenNI context object.


Constructor & Destructor Documentation

xn::Context::Context ( ) [inline]

Ctor.

xn::Context::Context ( XnContext pContext) [inline]

Ctor

Parameters:
pContext[in] Underlying C object
xn::Context::Context ( const Context other) [inline]

Copy Ctor

Parameters:
other[in] Another context. Note that the context will only be destroyed when The original object is destroyed.
xn::Context::~Context ( ) [inline]

Dtor.


Member Function Documentation

XnStatus xn::Context::AddLicense ( const XnLicense License) [inline]
For full details and usage, see xnAddLicense

XnStatus xn::Context::AutoEnumerateOverSingleInput ( NodeInfoList List,
XnProductionNodeDescription description,
const XnChar *  strCreationInfo,
XnProductionNodeType  InputType,
EnumerationErrors pErrors,
Query pQuery = NULL 
) const [inline]
For full details and usage, see xnAutoEnumerateOverSingleInput

XnStatus xn::Context::CreateAnyProductionTree ( XnProductionNodeType  type,
Query pQuery,
ProductionNode node,
EnumerationErrors pErrors = NULL 
) [inline]

Enumerates for production trees for a specific node type, and creates the first found tree. This function is a shortcut version for using xnEnumerateProductionTrees(), iterating the list, and then calling xnCreateProductionTree().

For full details and usage, see xnCreateAnyProductionTree

XnStatus xn::Context::CreateCodec ( XnCodecID  codecID,
ProductionNode initializerNode,
Codec codec 
) [inline]
For full details and usage, see xnCreateCodec

XnStatus xn::Context::CreateMockNode ( XnProductionNodeType  type,
const XnChar *  strName,
ProductionNode node 
) [inline]

Creates a production node which is only a mock. This node does not represent an actual node, but only keeps a state and implements an interface above it. Mock nodes are useful when simulating nodes for playing recordings, or for use in tests. See also xnCreateMockNodeBasedOn().

For full details and usage, see xnCreateMockNode

XnStatus xn::Context::CreateMockNodeBasedOn ( ProductionNode originalNode,
const XnChar *  strName,
ProductionNode mockNode 
) [inline]

Creates a production node which is only a mock, base on the type and properties of another node. This node does not represent an actual node, but only keeps a state and implements an interface above it. Mock nodes are useful when simulating nodes for playing recordings, or for use in tests. See also xnCreateMockNode().

For full details and usage, see xnCreateMockNodeBasedOn

XnStatus xn::Context::CreateProductionTree ( NodeInfo Tree) [inline]

Creates a production node. If the tree specifies additional needed nodes, and those nodes do not exist, they will be created too, and passed to this node as input.

For full details and usage, see xnCreateProductionTree

XnStatus xn::Context::EnumerateExistingNodes ( NodeInfoList list) const [inline]

Gets a list of all existing node in the context. Each node that was returned increases its ref count. The list must be freed using xnNodeInfoListFree().

For full details and usage, see xnEnumerateExistingNodes

XnStatus xn::Context::EnumerateExistingNodes ( NodeInfoList list,
XnProductionNodeType  type 
) const [inline]

Gets a list of all existing node in the context. Each node that was returned increases its ref count. The list must be freed using xnNodeInfoListFree().

For full details and usage, see xnEnumerateExistingNodesByType

XnStatus xn::Context::EnumerateLicenses ( XnLicense *&  aLicenses,
XnUInt32 &  nCount 
) const [inline]
For full details and usage, see xnEnumerateLicenses

XnStatus xn::Context::EnumerateProductionTrees ( XnProductionNodeType  Type,
Query pQuery,
NodeInfoList TreesList,
EnumerationErrors pErrors = NULL 
) const [inline]

Enumerates all available production trees for a specific node type. The trees populated in the list should be freed by calling xnNodeInfoListFree() once not needed.

For full details and usage, see xnEnumerateProductionTrees

XnStatus xn::Context::FindExistingNode ( XnProductionNodeType  type,
ProductionNode node 
) const [inline]

Returns the first found existing node of the specified type.

For full details and usage, see xnFindExistingNodeByType

static void xn::Context::FreeLicensesList ( XnLicense  aLicenses[]) [inline, static]
For full details and usage, see xnFreeLicensesList

XnStatus xn::Context::GetGlobalErrorState ( ) [inline]

Gets the global error state of the context. If one of the nodes in the context is in error state, that state will be returned. If more than one node is in error state, XN_STATUS_MULTIPLE_NODES_ERROR is returned. An application can query each node error state by calling xnGetNodeErrorState().

For full details and usage, see xnGetGlobalErrorState

XnBool xn::Context::GetGlobalMirror ( ) [inline]

Gets the global mirror flag.

For full details and usage, see xnGetGlobalMirror

XnStatus xn::Context::GetProductionNodeByName ( const XnChar *  strInstanceName,
ProductionNode node 
) const [inline]

Gets a handle to an existing production node instance using that instance name.

For full details and usage, see xnGetNodeHandleByName

XnStatus xn::Context::GetProductionNodeInfoByName ( const XnChar *  strInstanceName,
NodeInfo nodeInfo 
) const [inline]

Gets a handle to an existing production node instance using that instance name.

For full details and usage, see xnGetNodeHandleByName

XnContext* xn::Context::GetUnderlyingObject ( ) const [inline]

Gets the underlying C object.

XnStatus xn::Context::Init ( ) [inline]

Initializes the OpenNI library.

For full details and usage, see xnInit

XnStatus xn::Context::InitFromXmlFile ( const XnChar *  strFileName,
EnumerationErrors pErrors = NULL 
) [inline]

Initializes OpenNI context, and then configures it using the given file.

For full details and usage, see xnInitFromXmlFile

XnStatus xn::Context::OpenFileRecording ( const XnChar *  strFileName) [inline]

Opens a recording file, adding all nodes in it to the context.

For full details and usage, see xnContextOpenFileRecording

XnStatus xn::Context::RegisterToErrorStateChange ( XnErrorStateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
) [inline]

Registers a callback function to global error state changes.

For full details and usage, see xnRegisterToGlobalErrorStateChange

XnStatus xn::Context::RunXmlScript ( const XnChar *  strScript,
EnumerationErrors pErrors = NULL 
) [inline]

Runs an XML script in the given context.

For full details and usage, see xnContextRunXmlScript

XnStatus xn::Context::RunXmlScriptFromFile ( const XnChar *  strFileName,
EnumerationErrors pErrors = NULL 
) [inline]

Runs an XML script in the given context.

For full details and usage, see xnContextRunXmlScriptFromFile

XnStatus xn::Context::SetGlobalMirror ( XnBool  bMirror) [inline]

Sets the global mirror flag. This will set all current existing nodes' mirror state, and also affect future created nodes. The default mirror flag is FALSE.

For full details and usage, see xnSetGlobalMirror

void xn::Context::SetHandle ( XnContext pContext) [inline]

Replaces the underlying C object pointed to by this object.

void xn::Context::Shutdown ( ) [inline]

Shuts down the OpenNI library. No other OpenNI function can be called after calling this function.

For full details and usage, see xnShutdown

XnStatus xn::Context::StartGeneratingAll ( ) [inline]

Make sure all generators are generating data.

For full details and usage, see xnStartGeneratingAll

XnStatus xn::Context::StopGeneratingAll ( ) [inline]

Stop all generators from generating data.

For full details and usage, see xnStopGeneratingAll

void xn::Context::UnregisterFromErrorStateChange ( XnCallbackHandle  hCallback) [inline]

Unregisters a callback function which was registered using xnRegisterToGlobalErrorStateChange().

For full details and usage, see xnUnregisterFromGlobalErrorStateChange

XnStatus xn::Context::WaitAndUpdateAll ( ) [inline]

Updates all generators nodes in the context, waiting for all to have new data.

For full details and usage, see xnWaitAndUpdateAll

XnStatus xn::Context::WaitAnyUpdateAll ( ) [inline]

Updates all generators nodes in the context, once any of them have new data.

For full details and usage, see xnWaitAnyUpdateAll

XnStatus xn::Context::WaitNoneUpdateAll ( ) [inline]

Updates all generator nodes in the context, without any waiting. If a node has new data, it will be updated.

For full details and usage, see xnWaitNoneUpdateAll

XnStatus xn::Context::WaitOneUpdateAll ( ProductionNode node) [inline]

Updates all generators nodes in the context, waiting for a specific one to have new data.

For full details and usage, see xnWaitOneUpdateAll


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