mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
add heap.h
This commit is contained in:
parent
c5ed0cf810
commit
3a2f478521
25
src/heap.h
Normal file
25
src/heap.h
Normal file
@ -0,0 +1,25 @@
|
||||
#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
|
Loading…
Reference in New Issue
Block a user