Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pugi::xpath_query queryShape("/shapes/layer/shape[@category='Shapes']");
- pugi::xpath_node_set qShape = queryShape.evaluate_node_set(doc);
- //pugi::xpath_query queryShapePoints("/shapes/layer/shape[@category='Shapes']/point");
- //pugi::xpath_node_set qShapePoint = queryShapePoints.evaluate_node_set(doc);
- std::cout << "setting *** SHAPE *** objects" << std::endl;
- std::list<Shape> listaShape;
- for (int i = 0; i < nsShapes; i++)
- {
- Shape shapeTemp;
- std::cout << "SHAPE " << i + 1 << std::endl;
- shapeTemp.setShapeCategory(qShape[i].node().attribute("category").value());
- shapeTemp.setShapeColor(qShape[i].node().attribute("color").value());
- shapeTemp.setShapeName(qShape[i].node().attribute("name").value());
- shapeTemp.setShapeTemplate(qShape[i].node().attribute("template").value());
- shapeTemp.setShapeType(qShape[i].node().attribute("type").value());
- shapeTemp.setShapeCoord(qShape[i].node().child("point").attribute("latitude").value(), qShape[i].node().child("point").attribute("longitude").value());
- listaShape.push_back(shapeTemp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement