|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListAllocate (XnNodeInfoList **ppList) |
|
XN_C_API void XN_C_DECL | xnNodeInfoListFree (XnNodeInfoList *pList) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListAdd (XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListAddEx (XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes, const void *pAdditionalData, XnFreeHandler pFreeHandler) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListAddNode (XnNodeInfoList *pList, XnNodeInfo *pNode) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListAddNodeFromList (XnNodeInfoList *pList, XnNodeInfoListIterator otherListIt) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListRemove (XnNodeInfoList *pList, XnNodeInfoListIterator it) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListClear (XnNodeInfoList *pList) |
|
XN_C_API XnStatus XN_C_DECL | xnNodeInfoListAppend (XnNodeInfoList *pList, XnNodeInfoList *pOther) |
|
XN_C_API XnBool XN_C_DECL | xnNodeInfoListIsEmpty (XnNodeInfoList *pList) |
|
XN_C_API XnNodeInfoListIterator XN_C_DECL | xnNodeInfoListGetFirst (XnNodeInfoList *pList) |
|
XN_C_API XnNodeInfoListIterator XN_C_DECL | xnNodeInfoListGetLast (XnNodeInfoList *pList) |
|
XN_C_API XnBool XN_C_DECL | xnNodeInfoListIteratorIsValid (XnNodeInfoListIterator it) |
|
XN_C_API XnNodeInfo *XN_C_DECL | xnNodeInfoListGetCurrent (XnNodeInfoListIterator it) |
|
XN_C_API XnNodeInfoListIterator XN_C_DECL | xnNodeInfoListGetNext (XnNodeInfoListIterator it) |
|
XN_C_API XnNodeInfoListIterator XN_C_DECL | xnNodeInfoListGetPrevious (XnNodeInfoListIterator it) |
|
Adding and Removing Node Info Objects
Nodes can be added to the list using xnNodeInfoListAdd(). Note that once an info object is part of the list, it will be freed if that list is freed. A node can be removed by calling xnNodeInfoListRemove(), which also frees that element.
A short example:
Enumeration
Forward Iteration:
Backwards Iteration:
◆ xnNodeInfoListAdd()
Creates and adds a single XnNodeInfo object to the list. See also xnNodeInfoListAddEx().
- Parameters
-
pList | [in] The list. |
pDescription | [in] The description of this production node. |
strCreationInfo | [in] Optional. Additional needed information for instantiation. |
pNeededNodes | [in] Optional. A list of needed nodes. |
◆ xnNodeInfoListAddEx()
Creates and adds a single XnNodeInfo object to the list, with additional data. This data can be later extracted using the xnNodeInfoGetAdditionalData(). Before the node info object is freed, the pFreeHandler callback will be called, so it could free the additional data object.
- Parameters
-
pList | [in] The list. |
pDescription | [in] The description of this production node. |
strCreationInfo | [in] Optional. Additional needed information for instantiation. |
pNeededNodes | [in] Optional. A list of needed nodes. |
pAdditionalData | [in] Additional data, which is specific to this node. |
pFreeHandler | [in] Optional. A callback function for freeing the additional data. |
◆ xnNodeInfoListAddNode()
Adds a single XnNodeInfo object to the list.
- Parameters
-
pList | [in] The list. |
pNode | [in] The node to add. |
◆ xnNodeInfoListAddNodeFromList()
Adds a node from another list to this list (the node is not removed from the other list).
- Parameters
-
pList | [in] The list. |
otherListIt | [in] An iterator obtained from another list. |
◆ xnNodeInfoListAllocate()
◆ xnNodeInfoListAppend()
Appends another list at the end of this list. Note that the other list becomes empty, but still needs to be freed.
- Parameters
-
pList | [in] A list. |
pOther | [in] The list to be appended. |
◆ xnNodeInfoListClear()
Clears a node info list, freeing all the elements in it.
- Parameters
-
pList | [in] The list to be freed. |
◆ xnNodeInfoListFree()
◆ xnNodeInfoListGetCurrent()
Gets current element from an iterator.
- Parameters
-
- Returns
- an XnNodeInfo pointer.
◆ xnNodeInfoListGetFirst()
Gets the first element of the list.
- Parameters
-
pList | [in] [Optional] A list. |
- Returns
- an iterator to the first element of the list, or NULL if the list is empty.
◆ xnNodeInfoListGetLast()
Gets the last element of the list.
- Parameters
-
pList | [in] [Optional] A list. |
- Returns
- an iterator to the last element of the list, or NULL if the list is empty.
◆ xnNodeInfoListGetNext()
Gets an iterator to the next element from a current iterator.
- Parameters
-
- Returns
- an iterator to the next element.
◆ xnNodeInfoListGetPrevious()
Gets an iterator to the previous element from a current iterator.
- Parameters
-
- Returns
- an iterator to the previous element.
◆ xnNodeInfoListIsEmpty()
Checks if the given list is empty
- Parameters
-
◆ xnNodeInfoListIteratorIsValid()
Checks if the current iterator points to a valid location.
- Parameters
-
◆ xnNodeInfoListRemove()
Removes an element from the list, and frees it.
- Parameters
-
pList | [in] The list. |
it | [in] Iterator to the element that should be removed. |