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

Method OpenFile

Source/OpenNI/XnLogFileWriter.cpp:81–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81XnStatus XnLogFileWriter::OpenFile()
82{
83 if (m_fLogFile == XN_INVALID_FILE_HANDLE)
84 {
85 // open file
86 XnStatus nRetVal = xnLogCreateNewFile("log", TRUE, m_strCurrFileName, XN_FILE_MAX_PATH, &m_fLogFile);
87 if (nRetVal != XN_STATUS_OK)
88 {
89 // we don't have much to do if files can't be open. Logs will not be written to file
90 printf("Couldn't create log file! Logs will not be written (error: %s)\n", xnGetStatusString(nRetVal));
91 m_fLogFile = XN_INVALID_FILE_HANDLE;
92 return nRetVal;
93 }
94 }
95
96 return XN_STATUS_OK;
97}
98
99void XnLogFileWriter::CloseFile()
100{

Callers

nothing calls this directly

Calls 2

xnLogCreateNewFileFunction · 0.85
xnGetStatusStringFunction · 0.85

Tested by

no test coverage detected