--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/simulator/ns2-calendar-scheduler.cc Thu Jan 15 11:23:59 2009 +0100
@@ -0,0 +1,70 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * XXXX
+ */
+
+#include "ns2-calendar-scheduler.h"
+#include "event-impl.h"
+#include <utility>
+#include <string>
+#include <list>
+#include "ns3/assert.h"
+#include "ns3/log.h"
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("Ns2CalendarScheduler");
+
+NS_OBJECT_ENSURE_REGISTERED (Ns2CalendarScheduler);
+
+TypeId
+Ns2CalendarScheduler::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::Ns2CalendarScheduler")
+ .SetParent<Scheduler> ()
+ .AddConstructor<Ns2CalendarScheduler> ()
+ ;
+ return tid;
+}
+
+Ns2CalendarScheduler::Ns2CalendarScheduler ()
+{
+ NS_LOG_FUNCTION (this);
+}
+Ns2CalendarScheduler::~Ns2CalendarScheduler ()
+{
+ NS_LOG_FUNCTION (this);
+}
+void
+Ns2CalendarScheduler::Insert (const Event &ev)
+{
+ NS_LOG_FUNCTION (this);
+}
+bool
+Ns2CalendarScheduler::IsEmpty (void) const
+{
+ return false;
+}
+Scheduler::Event
+Ns2CalendarScheduler::PeekNext (void) const
+{
+ NS_LOG_FUNCTION (this);
+ return Scheduler::Event ();
+}
+
+
+Scheduler::Event
+Ns2CalendarScheduler::RemoveNext (void)
+{
+ NS_LOG_FUNCTION (this);
+ return Scheduler::Event ();
+}
+
+void
+Ns2CalendarScheduler::Remove (const Event &ev)
+{
+ NS_ASSERT (!IsEmpty ());
+ NS_ASSERT (false);
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/simulator/ns2-calendar-scheduler.h Thu Jan 15 11:23:59 2009 +0100
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 1994 Regents of the University of California.
+ * Copyright (c) 2009 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Authors:
+ * David Wetherall <djw@juniper.lcs.mit.edu>: originally, in ns-2, back in 1997,
+ * Mathieu Lacage <mathieu.lacage@sophia.inria.fr>: port to ns-3
+ */
+
+#ifndef NS2_CALENDAR_SCHEDULER_H
+#define NS2_CALENDAR_SCHEDULER_H
+
+#include "scheduler.h"
+#include <stdint.h>
+#include <list>
+
+namespace ns3 {
+
+class EventImpl;
+
+/**
+ * \ingroup scheduler
+ * \brief a calendar queue event scheduler
+ *
+ * This event scheduler is a copy/paste of the ns2.29 calendar scheduler.
+ */
+class Ns2CalendarScheduler : public Scheduler
+{
+public:
+ static TypeId GetTypeId (void);
+
+ Ns2CalendarScheduler ();
+ virtual ~Ns2CalendarScheduler ();
+
+ virtual void Insert (const Event &ev);
+ virtual bool IsEmpty (void) const;
+ virtual Event PeekNext (void) const;
+ virtual Event RemoveNext (void);
+ virtual void Remove (const Event &ev);
+
+private:
+};
+
+} // namespace ns3
+
+#endif /* NS2_CALENDAR_SCHEDULER_H */
--- a/src/simulator/wscript Wed Jan 14 15:36:19 2009 +0000
+++ b/src/simulator/wscript Thu Jan 15 11:23:59 2009 +0100
@@ -49,6 +49,7 @@
'map-scheduler.cc',
'heap-scheduler.cc',
'calendar-scheduler.cc',
+ 'ns2-calendar-scheduler.cc',
'event-impl.cc',
'simulator.cc',
'default-simulator-impl.cc',
@@ -73,6 +74,7 @@
'map-scheduler.h',
'heap-scheduler.h',
'calendar-scheduler.h',
+ 'ns2-calendar-scheduler.h',
'simulation-singleton.h',
'timer.h',
'timer-impl.h',