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

DFS.cpp

Go to the documentation of this file.
00001 #include "DFS.h"
00002 #include "NodeVisitingProxy.h"
00003 #include "NodeWalkingProxy.h"
00004 
00005 #include <iostream>
00006 
00007 using namespace X3DTK;
00008 using namespace std;
00009 
00010 DFS::DFS()
00011 : X3DTTAlgorithm()
00012 {
00013 }
00014 
00015 DFS::~DFS()
00016 {
00017 }
00018 
00019 DFS *X3DTK::joinDFS(DFS *D1, DFS *D2)
00020 {
00021   DFS *D = new DFS();
00022   
00023   D->nvp = joinNodeVisitingProxies(D1->nvp, D2->nvp);
00024   D->nwp = joinNodeWalkingProxies(D1->nwp, D2->nwp);
00025   D->nwp->setNodeVisitingProxy(D->nvp);
00026   
00027   return D;
00028 }
00029 
00030 DFS *X3DTK::mergeDFS(DFS *D1, DFS *D2)
00031 {
00032   DFS *D = new DFS();
00033   
00034   delete D->nvp;
00035   delete D->nwp;
00036   
00037   D->nvp = joinNodeVisitingProxies(D1->nvp, D2->nvp);
00038   D->nwp = joinNodeWalkingProxies(D1->nwp, D2->nwp);
00039   D->nwp->setNodeVisitingProxy(D->nvp);
00040   
00041   delete D1;
00042   delete D2;
00043   
00044   return D;
00045 }

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