Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

GraphTraversal.h

Go to the documentation of this file.
00001 
00002 //                            GraphTraversal.h                                //
00004 
00005 #ifndef GRAPHTRAVERSAL_H
00006 #define GRAPHTRAVERSAL_H
00007 
00008 #include "StateVariables.h"
00009 #include "X3DTypes.h"
00010 
00011 #include <list>
00012 #include <typeinfo>
00013 #include <iostream>
00014 
00015 namespace X3DTK {
00016 
00017 class Walker;
00018 class Visitor; 
00019 class X3DComponentWalker;
00020 class X3DComponentVisitor;
00021 
00023 
00024 class GraphTraversal
00025 {
00026 public:
00028   GraphTraversal();
00030   virtual ~GraphTraversal();
00031   
00033   void setComponentWalker(X3DComponentWalker *component);
00035   void setComponentVisitor(X3DComponentVisitor *component);
00037   void setAutoDeleteComponents(bool value);
00039   void traverse(SFAbstractNode N) const;
00040   
00042   friend GraphTraversal *joinGraphTraversals(GraphTraversal *A1, GraphTraversal *A2);
00044   friend GraphTraversal *mergeGraphTraversals(GraphTraversal *A1, GraphTraversal *A2);
00045   
00047   template <class S>
00048   static S *getInstanceOf();
00049   
00051   template <class S>
00052   static void removeInstanceOf();
00053     
00054 protected:
00056   Visitor *visitor;     
00058   Walker *walker;
00059 
00060 private:
00061   static std::list<StateVariables *> _stateVariablesList;  
00062 };
00063 
00064 }
00065 
00066 #include "GraphTraversal.inl"
00067 
00068 #endif

Generated on Mon Jan 19 10:32:04 2004 for X3DToolKit by doxygen1.2.18