EventCollector: move methods to the .cc file
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Mon, 30 Jul 2007 13:09:02 +0100
changeset 1726 1aece815a3ba
parent 1725 ba1ef48ed8eb
child 1727 064aaa84c103
EventCollector: move methods to the .cc file
src/simulator/event-collector.cc
src/simulator/event-collector.h
--- 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;