X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fxml%2Feasyxml.hxx;h=f5ff575d9dcb2d803f277c3e32bfe6af335e32a6;hb=b9a34b1b05ce9cab1b4b67816d7d24bd2bc364b7;hp=348151efaa5e091d790dfa47b4d389eefa161c6e;hpb=78411d29a7fdd606e50a81d03d6e8a08dcb15828;p=simgear.git diff --git a/simgear/xml/easyxml.hxx b/simgear/xml/easyxml.hxx index 348151ef..f5ff575d 100644 --- a/simgear/xml/easyxml.hxx +++ b/simgear/xml/easyxml.hxx @@ -9,16 +9,15 @@ #define __EASYXML_HXX #include +#include -#include - -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include -SG_USING_STD(istream); -SG_USING_STD(string); -SG_USING_STD(vector); +using std::istream; +using std::string; +using std::vector; /** @@ -402,5 +401,27 @@ extern void readXML (istream &input, XMLVisitor &visitor, extern void readXML (const string &path, XMLVisitor &visitor); +/** + * @relates XMLVisitor + * Read an XML document. + * + * This function reads an XML document from the buffer provided, + * and invokes the callback methods in the visitor object to pass the + * parsing events back to the application. When this function + * returns, the parser will have reported all of the data in the XML + * document to the application through the visitor callback methods, + * and XML processing will be complete. + * + * @param buf The xml data buffer. + * @param size The size of the data buffer in bytes + * @param visitor An object that contains callbacks for XML parsing + * events. + * @exception Throws sg_io_exception or sg_xml_exception if there + * is a problem reading the file. + * @see XMLVisitor + */ +extern void readXML (const char *buf, const int size, XMLVisitor &visitor); + + #endif // __EASYXML_HXX