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

X3DComponent.cpp

Go to the documentation of this file.
00001 #include "X3DComponent.h"
00002 #include "Component.h"
00003 
00004 #include <iostream>
00005 
00006 using namespace std;
00007 using namespace X3DTK;
00008 
00009 X3DComponent::X3DComponent()
00010 : _proxyNumber(0)
00011 {
00012 }
00013 
00014 X3DComponent::~X3DComponent()
00015 {
00016   //cout << "destr X3DComponent " << component->getName() << " = " << (void *)this << endl;
00017   Component::removeOneReference(component);
00018 }
00019 
00020 void X3DComponent::addOneProxy()
00021 {
00022   ++_proxyNumber;  
00023 }
00024 
00025 void X3DComponent::removeOneProxy()
00026 {
00027   --_proxyNumber;  
00028 }
00029 
00030 void X3DComponent::defineComponentName(const SFString &name)
00031 {
00032   //cout << "new X3DComponent " << name << " = " << (void *)this << endl;
00033   component = Component::getComponent(name);
00034   
00035   if (component == 0)
00036     component = new Component(name);
00037   
00038   component->addOneReference();  
00039 }

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