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

Method OnNodeStringPropChanged

Source/Modules/nimRecorder/RecorderNode.cpp:208–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208XnStatus RecorderNode::OnNodeStringPropChanged(const XnChar* strNodeName, const XnChar* strPropName, const XnChar* strValue)
209{
210 m_nConfigurationID++;
211
212 XnUInt64 nUndoRecordPos = 0;
213 RecordedNodeInfo* pRecordedNodeInfo = NULL;
214 XnStatus nRetVal = UpdateNodePropInfo(strNodeName, strPropName, pRecordedNodeInfo, nUndoRecordPos);
215 XN_IS_STATUS_OK(nRetVal);
216 StringPropRecord record(m_pRecordBuffer, RECORD_MAX_SIZE, FALSE);
217 record.SetNodeID(pRecordedNodeInfo->nNodeID);
218 record.SetPropName(strPropName);
219 record.SetValue(strValue);
220 record.SetUndoRecordPos(nUndoRecordPos);
221 nRetVal = record.Encode();
222 if (nRetVal != XN_STATUS_OK)
223 {
224 xnLogWarning(XN_MASK_OPEN_NI, "Failed to encode String Property record: %s", xnGetStatusString(nRetVal));
225 XN_ASSERT(FALSE);
226 return nRetVal;
227 }
228
229 nRetVal = WriteRecordToStream(strNodeName, record);
230 if (nRetVal != XN_STATUS_OK)
231 {
232 xnLogWarning(XN_MASK_OPEN_NI, "Failed to write String Property record to file: %s", xnGetStatusString(nRetVal));
233 XN_ASSERT(FALSE);
234 return nRetVal;
235 }
236 return XN_STATUS_OK;
237}
238
239XnStatus RecorderNode::OnNodeGeneralPropChanged(const XnChar* strNodeName, const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer)
240{

Callers 3

SetStringPropertyMethod · 0.45
NotifyExStateMethod · 0.45

Calls 6

xnGetStatusStringFunction · 0.85
SetNodeIDMethod · 0.80
SetPropNameMethod · 0.80
SetUndoRecordPosMethod · 0.80
EncodeMethod · 0.80
SetValueMethod · 0.45

Tested by

no test coverage detected