/[usata]/usata2/src/objects/top-nodes.cpp
ViewVC logotype

Diff of /usata2/src/objects/top-nodes.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by skunix, Sun Jan 9 08:57:22 2005 UTC revision 1.4 by skunix, Mon Jan 10 20:10:21 2005 UTC
# Line 18  Line 18 
18  #include <utility>  #include <utility>
19  #include <algorithm>  #include <algorithm>
20  #include <GL/glew.h>  #include <GL/glew.h>
21  #include <iostream>  
22  namespace usata  namespace usata
23  {  {
24    
# Line 43  GenericNode::get_child(const std::string Line 43  GenericNode::get_child(const std::string
43          {          {
44                  return it->second;                  return it->second;
45          }          }
46            return Object_sp();
47          //throw          //throw
48            //! \todo fix this!
49  }  }
50  bool  bool
51  GenericNode::has_child(const std::string& n)  GenericNode::has_child(const std::string& n)
# Line 73  GenericNode::add_child(const Object_sp&o Line 75  GenericNode::add_child(const Object_sp&o
75          return;          return;
76    
77  }  }
 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;  
           
 }  
   
78    
79  void  void
80  GuiNode::create(NodeInterface*XP)  GuiNode::create(NodeInterface*XP)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26