* @brief Shorthand combination of two other initialization methods - @ref Init() and then @ref RunXmlScriptFromFile() - * to initialize the context object and then create a production graph. * * @param [in] strFileName Name of file containing an XML script. * @param [out] scriptNode ScriptNode object as the root to all the nodes created * from the XML file. When no long
| 8814 | * description in the XML file, this method creates a @ref xn::ProductionNode object. |
| 8815 | */ |
| 8816 | inline XnStatus InitFromXmlFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL) |
| 8817 | { |
| 8818 | XnContext* pContext = NULL; |
| 8819 | |
| 8820 | XnNodeHandle hScriptNode; |
| 8821 | XnStatus nRetVal = xnInitFromXmlFileEx(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode); |
| 8822 | XN_IS_STATUS_OK(nRetVal); |
| 8823 | |
| 8824 | scriptNode.TakeOwnership(hScriptNode); |
| 8825 | TakeOwnership(pContext); |
| 8826 | m_bAllocated = TRUE; |
| 8827 | |
| 8828 | return (XN_STATUS_OK); |
| 8829 | } |
| 8830 | |
| 8831 | /** |
| 8832 | * @brief Recreates a production graph from a recorded ONI file and then replays the data |
nothing calls this directly
no test coverage detected