cosmotool/sample/testBQueue.cpp
2009-01-11 10:07:57 -06:00

34 lines
547 B
C++

#include <iostream>
#include "bqueue.hpp"
using namespace std;
int main(int argc, char **argv)
{
CosmoTool::BoundedQueue<int,int,100000> bq(4);
for (int i = 10; i >= 0; i--)
{
bq.push(i, i);
int *prio = bq.getPriorities();
for (int j = 0; j < 4; j++)
cout << prio[j] << " ";
cout << endl;
}
for (int i = 1; i >= -2; i--)
{
bq.push(i, i);
int *prio = bq.getPriorities();
for (int j = 0; j < 4; j++)
cout << prio[j] << " ";
cout << endl;
}
return 0;
}