MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / xnXmlReadIntAttribute

Function xnXmlReadIntAttribute

Source/OpenNI/XnXml.cpp:109–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109XnStatus 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
127XnStatus xnXmlReadUInt32Attribute(const TiXmlElement* pElem, const XnChar* strName, XnUInt32* pnValue)
128{

Callers 3

xnLogInitFromXmlFileFunction · 0.85
xnXmlReadUserPositionFunction · 0.85
xnConfigurePropertyFunction · 0.85

Calls 4

xnXmlReadStringAttributeFunction · 0.85
RowMethod · 0.80
ColumnMethod · 0.80
ValueMethod · 0.45

Tested by

no test coverage detected