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

X3DTTAlgorithm.cpp

Go to the documentation of this file.
00001 #include "X3DTTAlgorithm.h"
00002 #include "NodeVisitingProxy.h"
00003 #include "NodeWalkingProxy.h"
00004 #include "X3DNode.h"
00005 
00006 #include <iostream>
00007 
00008 using namespace X3DTK;
00009 using namespace std;
00010 
00011 X3DTTAlgorithm::X3DTTAlgorithm()
00012 : nvp(new NodeVisitingProxy()), nwp(new NodeWalkingProxy())
00013 {
00014   nwp->setNodeVisitingProxy(nvp);
00015 }
00016 
00017 X3DTTAlgorithm::~X3DTTAlgorithm()
00018 {
00019   delete nwp;
00020   delete nvp;
00021 }
00022 
00023 void X3DTTAlgorithm::setComponentWalker(X3DComponentWalker *component)
00024 {
00025   nwp->setComponentWalker(component);
00026 }
00027 
00028 void X3DTTAlgorithm::setComponentVisitor(X3DComponentVisitor *component)
00029 {
00030   nvp->setComponentVisitor(component);
00031 }
00032 
00033 void X3DTTAlgorithm::setAutoDeleteComponents(bool value)
00034 {
00035   nvp->setAutoDeleteComponents(value);
00036   nwp->setAutoDeleteComponents(value);
00037 }
00038   
00039 void X3DTTAlgorithm::traverse(SFNode N) const
00040 {
00041   if ((nwp != 0) && (N != 0))
00042     nwp->walk(N);
00043 }

Generated on Wed May 14 10:03:12 2003 for X3DToolKit by doxygen1.3