#include STL_IOSTREAM
#include "props.hxx"
+#include "props_io.hxx"
#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout);
static void
show_values (const SGPropertyNode * node)
{
- cout << "Bool: " << node->getBoolValue() << endl;
+ cout << "Bool: " << (node->getBoolValue() ? "true" : "false") << endl;
cout << "Int: " << node->getIntValue() << endl;
cout << "Float: " << node->getFloatValue() << endl;
cout << "Double: " << node->getDoubleValue() << endl;
static void
dump_node (const SGPropertyNode * node)
{
- writeProperties(cout, node);
+ writeProperties(cout, node, true);
}
static void
test_property_nodes();
for (int i = 1; i < ac; i++) {
- cout << "Reading " << av[i] << endl;
- SGPropertyNode root;
- readProperties(av[i], &root);
- writeProperties(cout, &root);
- cout << endl;
+ try {
+ cout << "Reading " << av[i] << endl;
+ SGPropertyNode root;
+ readProperties(av[i], &root);
+ writeProperties(cout, &root, true);
+ cout << endl;
+ } catch (string &message) {
+ cout << "Aborted with " << message << endl;
+ }
}
return 0;