+static void dumpProperties(const SGPropertyNode *node)
+{
+ using namespace simgear;
+ cout << node->getPath() << '/' << endl;
+ for (int i = 0; i < node->nChildren(); i++) {
+ const SGPropertyNode *c = node->getChild(i);
+ props::Type type = c->getType();
+ if (type == props::ALIAS || c->nChildren())
+ continue;
+
+ int index = c->getIndex();
+ cout << std::setw(11) << getValueTypeString(c) << " " << c->getName();
+ if (index > 0)
+ cout << '[' << index << ']';
+ cout << " = ";
+
+ switch (c->getType()) {
+ case props::DOUBLE:
+ case props::FLOAT:
+ case props::VEC3D:
+ case props::VEC4D:
+ {
+ streamsize precision = cout.precision(15);
+ c->printOn(cout);
+ cout.precision(precision);
+ }
+ break;
+ case props::LONG:
+ case props::INT:
+ case props::BOOL:
+ c->printOn(cout);
+ break;
+ case props::STRING:
+ cout << '"' << c->getStringValue() << '"';
+ break;
+ case props::NONE:
+ break;
+ default:
+ cout << '\'' << c->getStringValue() << '\'';
+ }
+ cout << endl;
+ }
+ cout << endl;
+}
+
+