--- a/src/simulator/event-collector.cc Mon Jul 30 12:50:13 2007 +0100
+++ b/src/simulator/event-collector.cc Mon Jul 30 13:09:02 2007 +0100
@@ -21,8 +21,25 @@
#include "event-collector.h"
#include <algorithm>
+#define CLEANUP_CHUNK_MIN_SIZE 8
+#define CLEANUP_CHUNK_MAX_SIZE 1024
+
+
namespace ns3 {
+
+EventCollector::EventCollector () :
+ m_nextCleanupSize (CLEANUP_CHUNK_MIN_SIZE)
+{}
+
+void
+EventCollector::Track (EventId event)
+{
+ m_events.push_back (event);
+ if (m_events.size () >= m_nextCleanupSize)
+ Cleanup ();
+}
+
inline bool
EventExpiredPredicate (const EventId &event)
{
--- a/src/simulator/event-collector.h Mon Jul 30 12:50:13 2007 +0100
+++ b/src/simulator/event-collector.h Mon Jul 30 13:09:02 2007 +0100
@@ -38,27 +38,16 @@
{
public:
- EventCollector () :
- m_nextCleanupSize (CLEANUP_CHUNK_MIN_SIZE)
- {}
+ EventCollector ();
/**
* \brief Tracks a new event
*/
- void Track (EventId event)
- {
- m_events.push_back (event);
- if (m_events.size () >= m_nextCleanupSize)
- Cleanup ();
- }
+ void Track (EventId event);
~EventCollector ();
private:
- enum {
- CLEANUP_CHUNK_MIN_SIZE = 8,
- CLEANUP_CHUNK_MAX_SIZE = 1024
- };
std::list<EventId>::size_type m_nextCleanupSize;
std::list<EventId> m_events;