00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MAP_SCHEDULER_H
00022 #define MAP_SCHEDULER_H
00023
00024 #include "scheduler.h"
00025 #include <stdint.h>
00026 #include <map>
00027 #include <utility>
00028
00029 namespace ns3 {
00030
00031
00032
00033
00034
00035
00036
00037
00038 class MapScheduler : public Scheduler
00039 {
00040 public:
00041 static TypeId GetTypeId (void);
00042
00043 MapScheduler ();
00044 virtual ~MapScheduler ();
00045
00046 virtual void Insert (const Event &ev);
00047 virtual bool IsEmpty (void) const;
00048 virtual Event PeekNext (void) const;
00049 virtual Event RemoveNext (void);
00050 virtual void Remove (const Event &ev);
00051 private:
00052
00053 typedef std::map<Scheduler::EventKey, EventImpl*> EventMap;
00054 typedef std::map<Scheduler::EventKey, EventImpl*>::iterator EventMapI;
00055 typedef std::map<Scheduler::EventKey, EventImpl*>::const_iterator EventMapCI;
00056
00057
00058 EventMap m_list;
00059 };
00060
00061 }
00062
00063 #endif