00001
00002
00004
00005 #ifndef SCENEGRAPH_H
00006 #define SCENEGRAPH_H
00007
00008 #include "X3DTypes.h"
00009
00010 namespace X3DTK {
00011
00013
00014 class SceneGraph
00015 {
00016 friend class Component;
00017
00018 public:
00020 static SceneGraph *getSceneGraph(const SFString &name);
00021
00023 inline SFString getName() const {return _name;};
00025 inline MFComponent getComponentList() const {return _componentList;};
00026
00027 private:
00028 SceneGraph(const SFString &name);
00029 ~SceneGraph();
00030
00032 void addComponent(Component *component);
00034 void addOneReference();
00036 static void removeOneReference(SceneGraph *SceneGraph);
00037
00038 SFString _name;
00039 int _refCount;
00040 MFComponent _componentList;
00041
00042 static MFSceneGraph _sceneGraphList;
00043 };
00044
00045 }
00046
00047 #endif