core: Move TimerImpl to namespace internal
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
namespace internal
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup timer
|
||||
* The timer implementation underlying Timer and Watchdog.
|
||||
@@ -67,15 +70,10 @@ class TimerImpl
|
||||
virtual void Invoke() = 0;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
/********************************************************************
|
||||
* Implementation of TimerImpl implementation functions.
|
||||
********************************************************************/
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup timer
|
||||
* \defgroup timerimpl TimerImpl Implementation
|
||||
@@ -210,6 +208,8 @@ TimerImpl::SetArgs(Args... args)
|
||||
impl->SetArguments(args...);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* TIMER_IMPL_H */
|
||||
|
||||
@@ -50,8 +50,13 @@ namespace ns3
|
||||
* Timer is destroyed.
|
||||
*/
|
||||
|
||||
namespace internal
|
||||
{
|
||||
|
||||
class TimerImpl;
|
||||
|
||||
} // namespace internal
|
||||
|
||||
/**
|
||||
* \ingroup timer
|
||||
* \brief A simple virtual Timer class
|
||||
@@ -254,7 +259,7 @@ class Timer
|
||||
* The timer implementation, which contains the bound callback
|
||||
* function and arguments.
|
||||
*/
|
||||
TimerImpl* m_impl;
|
||||
internal::TimerImpl* m_impl;
|
||||
/** The amount of time left on the Timer while it is suspended. */
|
||||
Time m_delayLeft;
|
||||
};
|
||||
@@ -275,7 +280,7 @@ void
|
||||
Timer::SetFunction(FN fn)
|
||||
{
|
||||
delete m_impl;
|
||||
m_impl = MakeTimerImpl(fn);
|
||||
m_impl = internal::MakeTimerImpl(fn);
|
||||
}
|
||||
|
||||
template <typename MEM_PTR, typename OBJ_PTR>
|
||||
@@ -283,7 +288,7 @@ void
|
||||
Timer::SetFunction(MEM_PTR memPtr, OBJ_PTR objPtr)
|
||||
{
|
||||
delete m_impl;
|
||||
m_impl = MakeTimerImpl(memPtr, objPtr);
|
||||
m_impl = internal::MakeTimerImpl(memPtr, objPtr);
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
|
||||
@@ -33,8 +33,13 @@
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
namespace internal
|
||||
{
|
||||
|
||||
class TimerImpl;
|
||||
|
||||
} // namespace internal
|
||||
|
||||
/**
|
||||
* \ingroup timer
|
||||
* \brief A Trickle Timer following \RFC{6206}.
|
||||
@@ -230,7 +235,7 @@ class TrickleTimer
|
||||
* The timer implementation, which contains the bound callback
|
||||
* function and arguments.
|
||||
*/
|
||||
TimerImpl* m_impl;
|
||||
internal::TimerImpl* m_impl;
|
||||
|
||||
/** The future event scheduled to expire the timer. */
|
||||
EventId m_timerExpiration;
|
||||
@@ -265,7 +270,7 @@ void
|
||||
TrickleTimer::SetFunction(FN fn)
|
||||
{
|
||||
delete m_impl;
|
||||
m_impl = MakeTimerImpl(fn);
|
||||
m_impl = internal::MakeTimerImpl(fn);
|
||||
}
|
||||
|
||||
template <typename MEM_PTR, typename OBJ_PTR>
|
||||
@@ -273,7 +278,7 @@ void
|
||||
TrickleTimer::SetFunction(MEM_PTR memPtr, OBJ_PTR objPtr)
|
||||
{
|
||||
delete m_impl;
|
||||
m_impl = MakeTimerImpl(memPtr, objPtr);
|
||||
m_impl = internal::MakeTimerImpl(memPtr, objPtr);
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
|
||||
@@ -31,8 +31,13 @@
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
namespace internal
|
||||
{
|
||||
|
||||
class TimerImpl;
|
||||
|
||||
} // namespace internal
|
||||
|
||||
/**
|
||||
* \ingroup timer
|
||||
* \brief A very simple watchdog operating in virtual time.
|
||||
@@ -115,7 +120,7 @@ class Watchdog
|
||||
* The timer implementation, which contains the bound callback
|
||||
* function and arguments.
|
||||
*/
|
||||
TimerImpl* m_impl;
|
||||
internal::TimerImpl* m_impl;
|
||||
/** The future event scheduled to expire the timer. */
|
||||
EventId m_event;
|
||||
/** The absolute time when the timer will expire. */
|
||||
@@ -138,7 +143,7 @@ void
|
||||
Watchdog::SetFunction(FN fn)
|
||||
{
|
||||
delete m_impl;
|
||||
m_impl = MakeTimerImpl(fn);
|
||||
m_impl = internal::MakeTimerImpl(fn);
|
||||
}
|
||||
|
||||
template <typename MEM_PTR, typename OBJ_PTR>
|
||||
@@ -146,7 +151,7 @@ void
|
||||
Watchdog::SetFunction(MEM_PTR memPtr, OBJ_PTR objPtr)
|
||||
{
|
||||
delete m_impl;
|
||||
m_impl = MakeTimerImpl(memPtr, objPtr);
|
||||
m_impl = internal::MakeTimerImpl(memPtr, objPtr);
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
|
||||
Reference in New Issue
Block a user