-// easyxml.cxx - implementation of EasyXML interfaces.
+/**
+ * \file easyxml.cxx - implementation of EasyXML interfaces.
+ * Written by David Megginson, 2000-2001
+ * This file is in the Public Domain, and comes with NO WARRANTY of any kind.
+ */
#include <simgear/compiler.h>
#include "easyxml.hxx"
#include "xmlparse.h"
-#include STL_FSTREAM
-#include STL_IOSTREAM
+#include <fstream>
+#include <iostream>
-SG_USING_STD(ifstream);
+using std::ifstream;
\f
}
XML_ParserFree(parser);
+ visitor.endXML();
}
void
if (input.good()) {
try {
readXML(input, visitor, path);
- } catch (sg_io_exception &e) {
+ } catch (sg_io_exception &) {
input.close();
- throw e;
- } catch (sg_throwable &t) {
+ throw;
+ } catch (sg_throwable &) {
input.close();
- throw t;
+ throw;
}
} else {
throw sg_io_exception("Failed to open file", sg_location(path),
}
XML_ParserFree(parser);
+ visitor.endXML();
}
// end of easyxml.cxx