00001
00002
00003 #ifndef __GROUP_H
00004 #define __GROUP_H
00005
00006 #include <esg/Definitions.h>
00007 #include <esg/SceneGraphObject.h>
00008 #include <esg/spacesorting/SDS.h>
00009
00010
00011 namespace esg {
00012
00013 class OGSCENE_EXPORT IteratorSDS;
00014
00028 class OGSCENE_EXPORT Group : public SceneGraphObject {
00029 protected:
00030 SDS* _repository;
00031
00032 public:
00040 Group (const SDS & ss, OID oid = 0, const char * name = "");
00041
00045 virtual ~Group();
00046
00052 virtual bool hasSubnodes (void) const;
00053
00059 virtual IteratorSDS* traverseSubnodes (void) const;
00060
00064 SDS* getRepository (void) const { return _repository; }
00065
00072 int append (SceneGraphObject* o) {
00073 if (o && _repository) {
00074 _repository->append(o);
00075 if (o->tangible()) _tangible = true;
00076 return true;
00077 } else
00078 return false;
00079 }
00080
00086 bool build (void) {
00087 if (_repository) return _repository->build(); else return false;
00088 }
00089
00090
00091
00092
00093
00094
00098 virtual void __debug() {
00099 if (_repository) _repository->__debug();
00100 else fprintf(stderr,"Group: No repository defined\n");
00101 }
00102 };
00103
00104 };
00105
00106
00107 #endif // __GROUP_H