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

X3DComponentWalker.cpp

Go to the documentation of this file.
00001 #include "X3DComponentWalker.h"
00002 #include "Type.h"
00003 #include "NodeWalkingProxy.h"
00004 #include "NodeVisitingProxy.h"
00005 
00006 using namespace X3DTK;
00007 using namespace std;
00008 
00009 X3DComponentWalker::X3DComponentWalker()
00010 : nodeWalkingProxy(0), nodeVisitingProxy(0)
00011 {
00012 }
00013 
00014 void X3DComponentWalker::setNodeWalkingProxy(const NodeWalkingProxy *nodeWalkingProxy)
00015 {
00016   this->nodeWalkingProxy = (NodeWalkingProxy *)nodeWalkingProxy; 
00017 }
00018 
00019 void X3DComponentWalker::setNodeVisitingProxy(const NodeVisitingProxy *nodeVisitingProxy)
00020 {
00021   this->nodeVisitingProxy = (NodeVisitingProxy *)nodeVisitingProxy; 
00022 }
00023 
00024 X3DComponentWalker::~X3DComponentWalker()
00025 {
00026   //delete the creation functions
00027   for (WalkingDict::iterator it = walkingDict_.begin(); it != walkingDict_.end(); ++it)
00028     delete (*it).second; 
00029 }
00030 
00031 void X3DComponentWalker::setActiveAllFunctions()
00032 {
00033   for (WalkingDict::const_iterator it = walkingDict_.begin(); it != walkingDict_.end(); ++it)
00034     (*it).second->setActive();
00035 }
00036 
00037 void X3DComponentWalker::setInactiveAllFunctions()
00038 {
00039   for (WalkingDict::const_iterator it = walkingDict_.begin(); it != walkingDict_.end(); ++it)
00040     if ((*it).first != "X3DNode")
00041       (*it).second->setInactive();
00042 }
00043 
00044 WalkingFunction *X3DComponentWalker::getWalkingFunctionOf(const SFString &name) const
00045 {
00046   WalkingDict::const_iterator it = walkingDict_.find(name);
00047   if ((it != walkingDict_.end()) && ((*it).second->isActive()))
00048       return (*it).second;
00049       
00050   //not found  
00051   return 0;  
00052 }

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