]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/ConditionNode.cxx
Make return type from loadPagedModel explicit.
[simgear.git] / simgear / scene / model / ConditionNode.cxx
index e68cfa21adb1e69c552e6462b1f4f32dde3e18e5..93a28cd1e7ed2ca66d00306d65a3fde946909b6a 100644 (file)
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include "ConditionNode.hxx"
 
+#include <osgDB/Registry>
+#include <osgDB/Output>
+
 namespace simgear
 {
 using namespace osg;
@@ -51,4 +58,25 @@ void ConditionNode::traverse(NodeVisitor& nv)
     }
 }
 
+namespace
+{
+bool ConditionNode_writeLocalData(const Object& obj, osgDB::Output& fw)
+{
+    const ConditionNode& cn = static_cast<const ConditionNode&>(obj);
+    // Can't really print out conditions
+    fw.indent() << "expression ";
+    if (cn.getCondition())
+        fw << "yes\n";
+    else
+        fw << "no\n";
+    return true;
+}
+
+osgDB::RegisterDotOsgWrapperProxy g_ConditionNodeProxy(
+    new ConditionNode,
+    "simgear::ConditionNode",
+    "Object Node simgear::ConditionNode Group",
+    0,
+    &ConditionNode_writeLocalData);
+}
 }