corda/src/heap.h

31 lines
510 B
C
Raw Normal View History

2007-06-02 23:36:55 +00:00
#ifndef HEAP_H
#define HEAP_H
#include "system.h"
2007-06-02 23:36:55 +00:00
class Heap {
public:
enum CollectionType {
MinorCollection,
MajorCollection
};
class Visitor {
public:
2007-06-02 23:36:55 +00:00
virtual ~Visitor() { }
virtual void visit(void**) = 0;
};
class Iterator {
public:
2007-06-02 23:36:55 +00:00
virtual ~Iterator() { }
virtual void iterate(Visitor*) = 0;
};
virtual ~Heap() { }
virtual void collect(CollectionType type, Iterator* it) = 0;
virtual void check(void** p, System::Monitor* lock) = 0;
2007-06-02 23:36:55 +00:00
};
#endif//HEAP_H