usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/objects/top-nodes.cpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/objects/top-nodes.cpp
Date: Mon, 10 Jan 2005 15:26:08 -0500

Index: usata2/src/objects/top-nodes.cpp
diff -u usata2/src/objects/top-nodes.cpp:1.3 
usata2/src/objects/top-nodes.cpp:1.4
--- usata2/src/objects/top-nodes.cpp:1.3        Sun Jan  9 08:57:22 2005
+++ usata2/src/objects/top-nodes.cpp    Mon Jan 10 20:10:21 2005
@@ -10,7 +10,7 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: top-nodes.cpp,v 1.3 2005/01/09 08:57:22 skunix Exp $
+// $Id: top-nodes.cpp,v 1.4 2005/01/10 20:10:21 skunix Exp $
 
 
 #include "top-nodes.hpp"
@@ -18,7 +18,7 @@
 #include <utility>
 #include <algorithm>
 #include <GL/glew.h>
-#include <iostream>
+
 namespace usata
 {
 
@@ -43,7 +43,9 @@
        {
                return it->second;
        }
+       return Object_sp();
        //throw
+       //! \todo fix this!
 }
 bool
 GenericNode::has_child(const std::string& n)
@@ -73,30 +75,6 @@
        return; 
 
 }
-void 
-GenericNode::add_child(const Object_sp& obj, std::string& path)
-{
-       if (path.empty())
-       {
-               add_child(obj); 
-               return;
-       }
-       std::string nname = NodePathPop(path);
-       ChildV::iterator it=
-               std::find_if(children.begin(), children.end(),
-                       
boost::bind(std::equal_to<std::string>(),nname,bind(&Child::first,_1)));
-
-       if (it == children.end())
-       {
-               // throw!
-       }
-       NodeInterface* ni = 
dynamic_cast<NodeInterface*>(obj.get());//it->second.get());
-       if (!ni){ }// throw something!
-       ni->add_child(obj, path);       
-       return;
-       
-}
-
 
 void
 GuiNode::create(NodeInterface*XP)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]