00001
00002
00004
00005 #ifndef COMPONENT_H
00006 #define COMPONENT_H
00007
00008 #include "X3DTypes.h"
00009
00010 namespace X3DTK {
00011
00014
00015 class Component
00016 {
00017 friend class Type;
00018 friend class X3DComponent;
00019
00020 public:
00022 static Component *getComponent(const SFString &name);
00023
00025 inline SFString getName() const {return _name;};
00027 inline MFType getTypeList() const {return _typeList;};
00028
00029 private:
00030 Component(const SFString &name);
00031 ~Component();
00032
00034 void addType(Type *type);
00036 void addOneReference();
00038 static void removeOneReference(Component *component);
00039
00040 SFString _name;
00041 int _refCount;
00042 MFType _typeList;
00043
00044 static MFComponent _componentList;
00045 };
00046
00047 }
00048
00049 #endif