func:导入功能初步完成(没有检查重复)
This commit is contained in:
@@ -131,7 +131,7 @@ bool CXmlOpr::check_same_struct(const std::string& data)
|
||||
while (attribute) {
|
||||
++own_cnt;
|
||||
if (import_ele->FindAttribute(attribute->Name()) == nullptr) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
@@ -152,7 +152,7 @@ bool CXmlOpr::check_same_struct(const std::string& data)
|
||||
|
||||
// Warning: 不检查 xml 格式合法性,请自行调用 check_valid_xml_data
|
||||
// 且导入前每条数据请自行使用 check_same_struct 检测。
|
||||
bool CXmlOpr::import_newer_data(const std::vector<std::string>& vec, std::size_t success_count)
|
||||
bool CXmlOpr::import_newer_data(const std::vector<std::string>& vec, std::size_t& success_count)
|
||||
{
|
||||
success_count = 0;
|
||||
auto* last_item = parent_node_->LastChildElement(opr_base_.the_node.c_str());
|
||||
@@ -203,7 +203,7 @@ bool CXmlOpr::save()
|
||||
return true;
|
||||
}
|
||||
|
||||
void CXmlOpr::get_key_value(Element_t* ele, Property_t& vec)
|
||||
void CXmlOpr::get_attributes(Element_t* ele, Property_t& vec)
|
||||
{
|
||||
if (ele == nullptr) {
|
||||
return;
|
||||
@@ -216,7 +216,7 @@ void CXmlOpr::get_key_value(Element_t* ele, Property_t& vec)
|
||||
}
|
||||
}
|
||||
|
||||
void CXmlOpr::key_value_to_element(Element_t* ele, const Property_t& vec)
|
||||
void CXmlOpr::attributes_to_element(Element_t* ele, const Property_t& vec)
|
||||
{
|
||||
if (ele == nullptr) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user