rel:第一个初步可用版本。

This commit is contained in:
2024-05-15 13:17:24 +08:00
parent c7c80ed2ce
commit 8b794417ba
4 changed files with 76 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ bool CXmlOpr::open(const std::string &xml_path)
if (doc_.LoadFile(xml_path.c_str()) != tinyxml2::XML_SUCCESS) {
return false;
}
xml_path_ = xml_path;
return true;
}
@@ -45,3 +46,12 @@ bool CXmlOpr::parse_xml(std::vector<tinyxml2::XMLElement*>& vec)
}
return true;
}
bool CXmlOpr::save()
{
auto ret = doc_.SaveFile(xml_path_.c_str());
if (ret != tinyxml2::XML_SUCCESS) {
return false;
}
return true;
}