MCPcopy Create free account
hub / github.com/Tencent/libpag / WriteConfigFile

Function WriteConfigFile

exporter/src/config/ConfigFile.cpp:235–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void WriteConfigFile(ConfigParam* configParam) {
236 if (!configParam) {
237 return;
238 }
239
240 const auto& configPath = GetConfigPath();
241 if (configPath.empty()) {
242 return;
243 }
244
245 std::string filename = configPath + "PAGConfig.xml";
246
247 XMLDocument doc;
248 XMLDeclaration* decl = doc.NewDeclaration("xml version=\"1.0\" encoding=\"utf-8\"");
249 doc.InsertFirstChild(decl);
250
251 XMLElement* root = doc.NewElement("pag-exporter");
252 doc.InsertEndChild(root);
253
254 WriteCommonConfig(root, configParam);
255 WriteBitmapConfig(root, configParam);
256
257 doc.SaveFile(filename.c_str());
258}
259} // namespace exporter

Callers 1

saveConfigMethod · 0.85

Calls 4

GetConfigPathFunction · 0.85
WriteCommonConfigFunction · 0.85
WriteBitmapConfigFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected