2009-01-11 17:07:57 +01:00
|
|
|
#include <iostream>
|
|
|
|
#include "bqueue.hpp"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2010-09-12 21:36:37 +02:00
|
|
|
CosmoTool::BoundedQueue<int,int> bq(4, 100000.);
|
2009-01-11 17:07:57 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|