diff --git a/src/simulator/simulator.cc b/src/simulator/simulator.cc index 91a23862c..00af60a65 100644 --- a/src/simulator/simulator.cc +++ b/src/simulator/simulator.cc @@ -115,8 +115,8 @@ SimulatorPrivate::GetTypeId (void) .AddAttribute ("Scheduler", "The Scheduler used to handle all simulation events.", PointerValue (), - // XXX: allow getting the scheduler too. - MakePointerAccessor (&SimulatorPrivate::SetScheduler), + MakePointerAccessor (&SimulatorPrivate::SetScheduler, + &SimulatorPrivate::GetScheduler), MakePointerChecker ()) ; return tid; diff --git a/src/simulator/simulator.h b/src/simulator/simulator.h index 15f000cf5..892f9eb2f 100644 --- a/src/simulator/simulator.h +++ b/src/simulator/simulator.h @@ -61,7 +61,11 @@ public: */ static void EnableParallelSimulation (void); /** - * XXX + * \param scheduler a new event scheduler + * + * The event scheduler can be set at any time: the events scheduled + * in the previous scheduler will be transfered to the new scheduler + * before we start to use it. */ static void SetScheduler (Ptr scheduler); diff --git a/src/simulator/time.cc b/src/simulator/time.cc index 7dc3a8646..a25770277 100644 --- a/src/simulator/time.cc +++ b/src/simulator/time.cc @@ -271,7 +271,6 @@ std::istream& operator>> (std::istream& is, Time & time) else { is.setstate (std::ios_base::failbit); - // XXX: problem ? } return is; }