void PlayerImpl::Destroy()
{
	CloseFileImpl();

	for (PlayedNodesHash::Iterator it = m_playedNodes.begin(); it != m_playedNodes.end(); ++it)
	{
		PlayedNodeInfo& nodeInfo = it.Value();
		xnUnlockNodeForChanges(nodeInfo.hNode, nodeInfo.hLock);
		xnProductionNodeRelease(nodeInfo.hNode);
	}

	m_playedNodes.Clear();
}
Esempio n. 2
0
XnStatus PlayerImpl::EnumerateNodes(XnNodeInfoList** ppList)
{
	XnStatus nRetVal = XN_STATUS_OK;
	
	nRetVal = xnNodeInfoListAllocate(ppList);
	XN_IS_STATUS_OK(nRetVal);

	for (PlayedNodesHash::Iterator it = m_playedNodes.begin(); it != m_playedNodes.end(); ++it)
	{
		XnNodeInfo* pNodeInfo = xnGetNodeInfo(it.Value().hNode);

		nRetVal = xnNodeInfoListAddNode(*ppList, pNodeInfo);
		if (nRetVal != XN_STATUS_OK)
		{
			xnNodeInfoListFree(*ppList);
			return (nRetVal);
		}
	}

	return (XN_STATUS_OK);
}