| 46 | } |
| 47 | |
| 48 | void DataTypeManager::load(const std::string& _fileName) |
| 49 | { |
| 50 | std::string fileName = MyGUI::DataManager::getInstance().getDataPath(_fileName); |
| 51 | pugi::xml_document doc; |
| 52 | pugi::xml_parse_result result = doc.load_file(fileName.c_str()); |
| 53 | if (result) |
| 54 | { |
| 55 | pugi::xpath_node_set nodes = doc.select_nodes("Document/DataTypes/DataType"); |
| 56 | for (const auto& node : nodes) |
| 57 | { |
| 58 | DataTypePtr data = std::make_shared<DataType>(); |
| 59 | data->deserialization(node.node()); |
| 60 | mDataInfos.push_back(data); |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | void DataTypeManager::clear() |
| 66 | { |
nothing calls this directly
no test coverage detected