blob: 5b1e7180292d43447b2ba5aae38231be849b3206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#ifndef __FLATCOLLECTOR_H__
#define __FLATCOLLECTOR_H__
#include "core/object.hpp"
#include <set>
class FlatCollector : virtual public flat::core::object
{
FlatCollector * parent;
bool released;
std::set<FlatCollector*> children;
public:
FlatCollector(FlatCollector *parent = 0);
virtual ~FlatCollector();
/* Ownership functions */
bool isReleased() const;
/* Release object from automatic ownership destruction */
void release();
void attach(FlatCollector*);
void detach(FlatCollector*);
void setParent(FlatCollector*);
void releaseParent();
FlatCollector * getParent();
bool isParentOf(FlatCollector*) const;
std::set<FlatCollector*>::iterator begin();
std::set<FlatCollector*>::iterator end();
std::set<FlatCollector*>::const_iterator begin() const;
std::set<FlatCollector*>::const_iterator end() const;
};
#endif
|