LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 University of Washington | 3 * Copyright (c) 2008 University of Washington |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 m_currentTs = 0; | 79 m_currentTs = 0; |
80 m_currentContext = 0xffffffff; | 80 m_currentContext = 0xffffffff; |
81 m_unscheduledEvents = 0; | 81 m_unscheduledEvents = 0; |
82 | 82 |
83 // Be very careful not to do anything that would cause a change or assignment | 83 // Be very careful not to do anything that would cause a change or assignment |
84 // of the underlying reference counts of m_synchronizer or you will be sorry. | 84 // of the underlying reference counts of m_synchronizer or you will be sorry. |
85 m_synchronizer = CreateObject<WallClockSynchronizer> (); | 85 m_synchronizer = CreateObject<WallClockSynchronizer> (); |
86 } | 86 } |
87 | 87 |
88 RealtimeSimulatorImpl::~RealtimeSimulatorImpl () | 88 RealtimeSimulatorImpl::~RealtimeSimulatorImpl () |
| 89 {} |
| 90 |
| 91 void |
| 92 RealtimeSimulatorImpl::DoDispose (void) |
89 { | 93 { |
90 NS_LOG_FUNCTION_NOARGS (); | 94 NS_LOG_FUNCTION_NOARGS (); |
91 while (m_events->IsEmpty () == false) | 95 while (m_events->IsEmpty () == false) |
92 { | 96 { |
93 Scheduler::Event next = m_events->RemoveNext (); | 97 Scheduler::Event next = m_events->RemoveNext (); |
94 next.impl->Unref (); | 98 next.impl->Unref (); |
95 } | 99 } |
96 m_events = 0; | 100 m_events = 0; |
97 m_synchronizer = 0; | 101 m_synchronizer = 0; |
| 102 SimulatorImpl::DoDispose (); |
98 } | 103 } |
99 | 104 |
100 void | 105 void |
101 RealtimeSimulatorImpl::Destroy () | 106 RealtimeSimulatorImpl::Destroy () |
102 { | 107 { |
103 NS_LOG_FUNCTION_NOARGS (); | 108 NS_LOG_FUNCTION_NOARGS (); |
104 | 109 |
105 // | 110 // |
106 // This function is only called with the private version "disconnected" from | 111 // This function is only called with the private version "disconnected" from |
107 // the main simulator functions. We rely on the user not calling· | 112 // the main simulator functions. We rely on the user not calling· |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 } | 862 } |
858 | 863 |
859 Time | 864 Time |
860 RealtimeSimulatorImpl::GetHardLimit (void) const | 865 RealtimeSimulatorImpl::GetHardLimit (void) const |
861 { | 866 { |
862 NS_LOG_FUNCTION_NOARGS (); | 867 NS_LOG_FUNCTION_NOARGS (); |
863 return m_hardLimit; | 868 return m_hardLimit; |
864 } | 869 } |
865 ·· | 870 ·· |
866 }; // namespace ns3 | 871 }; // namespace ns3 |
LEFT | RIGHT |