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

Function loadModulesFile

Source/OpenNI/XnModuleLoader.cpp:157–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157XnStatus loadModulesFile(TiXmlDocument& doc)
158{
159 XnStatus nRetVal = XN_STATUS_OK;
160
161 XnChar strFileName[XN_FILE_MAX_PATH];
162
163 nRetVal = resolveModulesFile(strFileName, XN_FILE_MAX_PATH);
164 XN_IS_STATUS_OK(nRetVal);
165
166 XnBool bDoesExist = FALSE;
167 nRetVal = xnOSDoesFileExist(strFileName, &bDoesExist);
168 XN_IS_STATUS_OK(nRetVal);
169
170 if (bDoesExist)
171 {
172 nRetVal = xnXmlLoadDocument(doc, strFileName);
173 XN_IS_STATUS_OK(nRetVal);
174 }
175 else
176 {
177 TiXmlElement root("Modules");
178 doc.InsertEndChild(root);
179 doc.SaveFile(strFileName);
180 }
181
182 return (XN_STATUS_OK);
183}
184
185XnStatus saveModulesFile(TiXmlDocument& doc)
186{

Callers 3

LoadAllModulesMethod · 0.85
xnRegisterModuleFunction · 0.85
xnUnregisterModuleFunction · 0.85

Calls 5

resolveModulesFileFunction · 0.85
xnXmlLoadDocumentFunction · 0.85
InsertEndChildMethod · 0.80
xnOSDoesFileExistFunction · 0.50
SaveFileMethod · 0.45

Tested by

no test coverage detected