mirror of
https://github.com/corda/corda.git
synced 2025-01-23 12:58:35 +00:00
26 lines
408 B
C
26 lines
408 B
C
|
#ifndef HEAP_H
|
||
|
#define HEAP_H
|
||
|
|
||
|
class Heap {
|
||
|
public:
|
||
|
enum CollectionType {
|
||
|
MinorCollection,
|
||
|
MajorCollection
|
||
|
};
|
||
|
|
||
|
class Visitor {
|
||
|
virtual ~Visitor() { }
|
||
|
virtual void visit(void**) = 0;
|
||
|
};
|
||
|
|
||
|
class Iterator {
|
||
|
virtual ~Iterator() { }
|
||
|
virtual void iterate(Visitor*) = 0;
|
||
|
};
|
||
|
|
||
|
virtual ~Heap() { }
|
||
|
virtual void collect(CollectionType type, Iterator* it) = 0;
|
||
|
};
|
||
|
|
||
|
#endif//HEAP_H
|