* Loads the article definition from a YAML file. * @param node YAML node. * @param listOrder The list weight for this article. */
| 79 | * @param listOrder The list weight for this article. |
| 80 | */ |
| 81 | void ArticleDefinition::load(const YAML::Node &node, int listOrder) |
| 82 | { |
| 83 | id = title = node["id"].as<std::string>(id); |
| 84 | section = node["section"].as<std::string>(section); |
| 85 | requires = node["requires"].as< std::vector<std::string> >(requires); |
| 86 | title = node["title"].as<std::string>(title); |
| 87 | //_type_id = (UfopaediaTypeId)node["type_id"].as<int>(_type_id); |
| 88 | _listOrder = node["listOrder"].as<int>(_listOrder); |
| 89 | if (!_listOrder) |
| 90 | { |
| 91 | _listOrder = listOrder; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Gets the list weight of the article. |