| 1167 | } |
| 1168 | |
| 1169 | XN_C_API XnStatus xnNodeInfoListAddEx(XnNodeInfoList* pList, const XnProductionNodeDescription* pDescription, const XnChar* strCreationInfo, XnNodeInfoList* pNeededNodes, const void* pAdditionalData, XnFreeHandler pFreeHandler) |
| 1170 | { |
| 1171 | XnStatus nRetVal = XN_STATUS_OK; |
| 1172 | |
| 1173 | XN_VALIDATE_INPUT_PTR(pList); |
| 1174 | XN_VALIDATE_INPUT_PTR(pDescription); |
| 1175 | |
| 1176 | // allocate new node info |
| 1177 | XnNodeInfo* pNode; |
| 1178 | nRetVal = xnNodeInfoAllocate(pDescription, strCreationInfo, pNeededNodes, &pNode); |
| 1179 | XN_IS_STATUS_OK(nRetVal); |
| 1180 | |
| 1181 | nRetVal = xnNodeInfoSetAdditionalData(pNode, pAdditionalData, pFreeHandler); |
| 1182 | if (nRetVal != XN_STATUS_OK) |
| 1183 | { |
| 1184 | xnNodeInfoFree(pNode); |
| 1185 | return (nRetVal); |
| 1186 | } |
| 1187 | |
| 1188 | nRetVal = xnNodeInfoListAddNode(pList, pNode); |
| 1189 | if (nRetVal != XN_STATUS_OK) |
| 1190 | { |
| 1191 | xnNodeInfoFree(pNode); |
| 1192 | return (nRetVal); |
| 1193 | } |
| 1194 | |
| 1195 | // free it |
| 1196 | xnNodeInfoFree(pNode); |
| 1197 | |
| 1198 | return (XN_STATUS_OK); |
| 1199 | } |
| 1200 | |
| 1201 | XN_C_API XnStatus xnNodeInfoListAddNodeFromList(XnNodeInfoList* pList, XnNodeInfoListIterator pOtherListIt) |
| 1202 | { |
no test coverage detected