30 {
31 CHECK_NOTNULL(sections);
32 const auto lanes_node = xml_node.FirstChildElement("lanes");
33 CHECK_NOTNULL(lanes_node);
34 const tinyxml2::XMLElement* sub_node =
35 lanes_node->FirstChildElement("laneSection");
36 CHECK_NOTNULL(sub_node);
37
38 size_t section_cnt = 0;
39 while (sub_node) {
40 RoadSectionInternal section_internal;
41 std::string section_id = std::to_string(++section_cnt);
42 section_internal.id = section_id;
43 section_internal.section.mutable_id()->set_id(section_id);
46 *sub_node,
47 section_internal.section.mutable_boundary()->mutable_outer_polygon()));
48 sections->push_back(section_internal);
49
50 sub_node = sub_node->NextSiblingElement("laneSection");
51 }
52
53 CHECK_NE(sections->size(), 0U);
54
56}
static Status OK()
generate a success status.
#define RETURN_IF_ERROR(expr)