+/**
+ * Get the value as a string.
+ */
+string
+SGPropertyNode::get_string () const
+{
+ TEST_READ("");
+ char buf[128];
+
+ switch (_type) {
+ case ALIAS:
+ return _value.alias->getStringValue();
+ case BOOL:
+ if (GET_BOOL)
+ return "true";
+ else
+ return "false";
+ case INT:
+ sprintf(buf, "%d", GET_INT);
+ return buf;
+ case LONG:
+ sprintf(buf, "%ld", GET_LONG);
+ return buf;
+ case FLOAT:
+ sprintf(buf, "%f", GET_FLOAT);
+ return buf;
+ case DOUBLE:
+ sprintf(buf, "%f", GET_DOUBLE);
+ return buf;
+ case STRING:
+ case UNSPECIFIED:
+ return GET_STRING;
+ }
+
+ return ""; // if NONE
+}
+
+
+/**
+ * Trace a read access for a property.
+ */
+void
+SGPropertyNode::trace_read (SGPropertyNode::Type accessType) const
+{
+ SG_LOG(SG_GENERAL, SG_INFO, "TRACE: Read node " << getPath()
+ << ", value \"" << get_string() << '"');
+}
+
+
+/**
+ * Trace a write access for a property.
+ */
+void
+SGPropertyNode::trace_write (SGPropertyNode::Type accessType) const
+{
+ SG_LOG(SG_GENERAL, SG_INFO, "TRACE: Write node " << getPath()
+ << ", value\"" << get_string() << '"');
+}
+
+