Beispiel #1
0
  void checkNodeNameAttribute(magnet::xml::Node node)
  {
    //Check for unique names
    std::set<std::string> names;
    for (; node.valid(); ++node)
      {
	std::string currentname = node.getAttribute("Name").as<std::string>();
	if (names.find(currentname) != names.end())
	  M_throw() << node.getName() << " at path :" << node.getPath() << "\n Does not have a unique name (Name=\"" << currentname << "\")";
	names.insert(currentname);
      }
  }