Statistics
| Revision:

root / trunk / code / projects / warehouse / helper_classes / PQWrapper.h @ 2003

History | View | Annotate | Download (548 Bytes)

1
#ifndef _PQ_WRAPPER_
2
#define _PQ_WRAPPER_
3

    
4
#include <cstdlib>
5
#include <queue>
6
#include <iostream>
7
#include "Order.h"
8

    
9
class PQWrapper
10
{
11
    public:
12
        PQWrapper(unsigned int numElems);
13
        ~PQWrapper();
14
        
15
        void insert(Order o);
16
        Order remove(unsigned int index);
17
        Order peek(unsigned int index) const;
18
        unsigned int arraySize() const;
19

    
20
    private:
21
        Order* minElems;
22
        unsigned int arrCapacity, arrContents;
23
        std::priority_queue<Order,std::vector<Order>, CompareOrder> pq;
24
};
25
#endif