From 3a2f478521f5112d0635550932f07d027950544c Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 2 Jun 2007 17:36:55 -0600 Subject: [PATCH] add heap.h --- src/heap.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/heap.h diff --git a/src/heap.h b/src/heap.h new file mode 100644 index 0000000000..0bc3503563 --- /dev/null +++ b/src/heap.h @@ -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