XML parser/writer tailored for team formation document files. More...
#include <xml_formation.hh>

Public Member Functions | |
| XMLFormation (const std::string &schema_path) | |
| bool | switchFormationId (int formation_id) |
| Switch to a specific formation id. | |
| bool | hasCoord (int player_id) |
| Test the presence of row and col indication for a player. | |
| Coordinates | getCoord (int player_id) |
| Retrieve row and col for a player in current formation. | |
| virtual void | parse (const std::string &filename) |
| Parse an xml file. | |
Protected Member Functions | |
| virtual const char * | getExpectedRoot () const |
| Root node name we expect when loading the document. | |
| virtual void | initXMLInternal () |
| Initialize XML internals before parsing a document. | |
Protected Attributes | |
| int | formation_id_ |
| std::string | schema_path_ |
XML parser/writer tailored for team formation document files.
| Coordinates xml::XMLFormation::getCoord | ( | int | player_id | ) |
Retrieve row and col for a player in current formation.
Methods in XML aren't very useful here... :/
| XMLError | player_id not found |
References Coordinates::col, and Coordinates::row.
Referenced by CTeam::placeTeam().
| bool xml::XMLFormation::hasCoord | ( | int | player_id | ) |
Test the presence of row and col indication for a player.
Referenced by CTeam::placeTeam().
| void xml::XMLFormation::parse | ( | const std::string & | filename | ) | [virtual] |
Parse an xml file.
| filename | File to parse. |
| XMLError | Thrown on any kind of error. |
Reimplemented from xml::XML.
Referenced by CTeam::loadConfig().
1.6.3