tests/geometry/test-eventqueue.cpp
author Dmitriy Morozov <morozov@cs.duke.edu>
Fri, 14 Sep 2007 17:32:11 -0400
changeset 32 075da5d7d6c3
parent 19 efa14432761a
child 55 7e71f5984931
permissions -rw-r--r--
Changes to CMakeLists: * Optimize and debug options derive flags from CMKAE_CXX_FLAGS* * Moved CGAL CXX flags from the top level to the specific locations where they are required

#include <eventqueue.h>
#include <functional>
#include <iostream>

int main()
{
	typedef EventQueue<int, std::less<int> >			EQ;
	typedef EQ::iterator								iterator;
	 
	EQ queue;

	iterator i = queue.push(4);
	queue.push(2);
	queue.push(7);
	iterator j = queue.push(6);
	queue.push(5);

	*i = 8;
	queue.update(i);
	queue.remove(j);

	while (!queue.empty())
	{
		std::cout << *queue.top() << std::endl;
		queue.pop();
	}
}