| 107 | } |
| 108 | |
| 109 | XnStatus xnXmlReadIntAttribute(const TiXmlElement* pElem, const XnChar* strName, XnInt* pnValue) |
| 110 | { |
| 111 | XnStatus nRetVal = XN_STATUS_OK; |
| 112 | |
| 113 | const XnChar* strValue; |
| 114 | nRetVal = xnXmlReadStringAttribute(pElem, strName, &strValue); |
| 115 | XN_IS_STATUS_OK(nRetVal); |
| 116 | |
| 117 | if (sscanf(strValue, "%d", pnValue) == 0) |
| 118 | { |
| 119 | XN_LOG_WARNING_RETURN(XN_STATUS_CORRUPT_FILE, XN_MASK_OPEN_NI, |
| 120 | "Invalid '%s' xml entry - '%s' attribute value should be a number (line %u, col %u)!", |
| 121 | pElem->Value(), strName, pElem->Row(), pElem->Column()); |
| 122 | } |
| 123 | |
| 124 | return (XN_STATUS_OK); |
| 125 | } |
| 126 | |
| 127 | XnStatus xnXmlReadUInt32Attribute(const TiXmlElement* pElem, const XnChar* strName, XnUInt32* pnValue) |
| 128 | { |
no test coverage detected