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

Function xnEnumerationErrorsToString

Source/OpenNI/XnEnumerationErrors.cpp:106–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106XN_C_API XnStatus xnEnumerationErrorsToString(const XnEnumerationErrors* pErrors, XnChar* csBuffer, XnUInt32 nSize)
107{
108 XnStatus nRetVal = XN_STATUS_OK;
109
110 XnUInt32 nWritten = 0;
111 csBuffer[0] = '\0';
112
113 nRetVal = xnOSStrAppend(csBuffer, "One or more of the following nodes could not be enumerated:\n\n", nSize);
114 XN_IS_STATUS_OK(nRetVal);
115
116 nWritten = xnOSStrLen(csBuffer);
117
118 for (XnEnumerationErrorsIterator it = xnEnumerationErrorsGetFirst(pErrors);
119 xnEnumerationErrorsIteratorIsValid(it);
120 it = xnEnumerationErrorsGetNext(it))
121 {
122 nRetVal = xnProductionNodeDescriptionToString(xnEnumerationErrorsGetCurrentDescription(it), csBuffer + nWritten, nSize - nWritten);
123 XN_IS_STATUS_OK(nRetVal);
124
125 nRetVal = xnOSStrAppend(csBuffer, ": ", nSize);
126 XN_IS_STATUS_OK(nRetVal);
127
128 nRetVal = xnOSStrAppend(csBuffer, xnGetStatusString(xnEnumerationErrorsGetCurrentError(it)), nSize);
129 XN_IS_STATUS_OK(nRetVal);
130
131 nRetVal = xnOSStrAppend(csBuffer, "\n", nSize);
132 XN_IS_STATUS_OK(nRetVal);
133
134 nWritten = xnOSStrLen(csBuffer);
135 }
136
137 return (XN_STATUS_OK);
138}
139
140XN_C_API XnEnumerationErrorsIterator xnEnumerationErrorsGetFirst(const XnEnumerationErrors* pError)
141{

Callers 3

ToStringMethod · 0.85
mainFunction · 0.85

Calls 6

xnGetStatusStringFunction · 0.85
xnOSStrAppendFunction · 0.50
xnOSStrLenFunction · 0.50

Tested by

no test coverage detected