58 template <
typename T1>
66 template <
typename T1,
typename T2>
76 template <
typename T1,
typename T2,
typename T3>
77 void SetArgs (T1 a1, T2 a2, T3 a3);
88 template <
typename T1,
typename T2,
typename T3,
90 void SetArgs (T1 a1, T2 a2, T3 a3, T4 a4);
103 template <
typename T1,
typename T2,
typename T3,
104 typename T4,
typename T5>
105 void SetArgs (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
120 template <
typename T1,
typename T2,
typename T3,
121 typename T4,
typename T5,
typename T6>
122 void SetArgs (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6);
133 virtual void Invoke (
void) = 0;
152 template <
typename T1>
163 template <
typename T1,
typename T2>
175 template <
typename T1,
typename T2,
typename T3>
188 template <
typename T1,
typename T2,
typename T3,
typename T4>
199 virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4) = 0;
202 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
214 virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4, T5 a5) = 0;
217 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
230 virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4, T5 a5, T6 a6) = 0;
235 template <
typename T>
251 template <
typename FN>
263 template <
typename FN>
267 struct FnTimerImplZero :
public TimerImpl 269 FnTimerImplZero (FN fn)
277 virtual void Invoke (
void)
282 } *
function =
new FnTimerImplZero (fn);
290 template <
typename FN>
298 struct FnTimerImplOne :
public TimerImplOne<T1Parameter>
300 FnTimerImplOne (FN fn)
304 virtual void SetArguments (T1Parameter a1)
312 virtual void Invoke (
void)
318 } *
function =
new FnTimerImplOne (fn);
326 template <
typename FN>
337 struct FnTimerImplTwo :
public TimerImplTwo<T1Parameter,T2Parameter>
339 FnTimerImplTwo (FN fn)
343 virtual void SetArguments (T1Parameter a1, T2Parameter a2)
352 virtual void Invoke (
void)
359 } *
function =
new FnTimerImplTwo (fn);
367 template <
typename FN>
381 struct FnTimerImplThree :
public TimerImplThree<T1Parameter,T2Parameter,T3Parameter>
383 FnTimerImplThree (FN fn)
387 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3)
397 virtual void Invoke (
void)
399 m_fn (m_a1, m_a2, m_a3);
405 } *
function =
new FnTimerImplThree (fn);
413 template <
typename FN>
430 struct FnTimerImplFour :
public TimerImplFour<T1Parameter,T2Parameter,T3Parameter,T4Parameter>
432 FnTimerImplFour (FN fn)
436 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4)
447 virtual void Invoke (
void)
449 m_fn (m_a1, m_a2, m_a3, m_a4);
456 } *
function =
new FnTimerImplFour (fn);
464 template <
typename FN>
484 struct FnTimerImplFive :
public TimerImplFive<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter>
486 FnTimerImplFive (FN fn)
490 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4, T5Parameter a5)
502 virtual void Invoke (
void)
504 m_fn (m_a1, m_a2, m_a3, m_a4, m_a5);
512 } *
function =
new FnTimerImplFive (fn);
520 template <
typename FN>
543 struct FnTimerImplSix :
public TimerImplSix<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter,T6Parameter>
545 FnTimerImplSix (FN fn)
549 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4, T5Parameter a5, T6Parameter a6)
562 virtual void Invoke (
void)
564 m_fn (m_a1, m_a2, m_a3, m_a4, m_a5, m_a6);
573 } *
function =
new FnTimerImplSix (fn);
587 template <
typename T>
600 template <
typename T>
625 template <
typename MEM_PTR,
typename OBJ_PTR>
637 template <
typename MEM_PTR,
typename OBJ_PTR>
641 struct MemFnTimerImplZero :
public TimerImpl 643 MemFnTimerImplZero (MEM_PTR memPtr, OBJ_PTR objPtr)
652 virtual void Invoke (
void)
658 } *
function =
new MemFnTimerImplZero (memPtr, objPtr);
666 template <
typename MEM_PTR,
typename OBJ_PTR>
674 struct MemFnTimerImplOne :
public TimerImplOne<T1Parameter>
676 MemFnTimerImplOne (MEM_PTR memPtr, OBJ_PTR objPtr)
681 virtual void SetArguments (T1Parameter a1)
689 virtual void Invoke (
void)
696 } *
function =
new MemFnTimerImplOne (memPtr, objPtr);
704 template <
typename MEM_PTR,
typename OBJ_PTR>
715 struct MemFnTimerImplTwo :
public TimerImplTwo<T1Parameter,T2Parameter>
717 MemFnTimerImplTwo (MEM_PTR memPtr, OBJ_PTR objPtr)
722 virtual void SetArguments (T1Parameter a1, T2Parameter a2)
731 virtual void Invoke (
void)
739 } *
function =
new MemFnTimerImplTwo (memPtr, objPtr);
747 template <
typename MEM_PTR,
typename OBJ_PTR>
761 struct MemFnTimerImplThree :
public TimerImplThree<T1Parameter,T2Parameter,T3Parameter>
763 MemFnTimerImplThree (MEM_PTR memPtr, OBJ_PTR objPtr)
768 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3)
778 virtual void Invoke (
void)
787 } *
function =
new MemFnTimerImplThree (memPtr, objPtr);
795 template <
typename MEM_PTR,
typename OBJ_PTR>
812 struct MemFnTimerImplFour :
public TimerImplFour<T1Parameter,T2Parameter,T3Parameter,T4Parameter>
814 MemFnTimerImplFour (MEM_PTR memPtr, OBJ_PTR objPtr)
819 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4)
830 virtual void Invoke (
void)
840 } *
function =
new MemFnTimerImplFour (memPtr, objPtr);
848 template <
typename MEM_PTR,
typename OBJ_PTR>
868 struct MemFnTimerImplFive :
public TimerImplFive<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter>
870 MemFnTimerImplFive (MEM_PTR memPtr, OBJ_PTR objPtr)
875 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4,T5Parameter a5)
887 virtual void Invoke (
void)
898 } *
function =
new MemFnTimerImplFive (memPtr, objPtr);
906 template <
typename MEM_PTR,
typename OBJ_PTR>
929 struct MemFnTimerImplSix :
public TimerImplSix<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter,T6Parameter>
931 MemFnTimerImplSix (MEM_PTR memPtr, OBJ_PTR objPtr)
936 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4,T5Parameter a5,T6Parameter a6)
947 return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4, m_a5, m_a6);
949 virtual void Invoke (
void)
961 } *
function =
new MemFnTimerImplSix (memPtr, objPtr);
972 template <
typename T1>
979 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
982 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
985 impl->SetArguments (a1);
988 template <
typename T1,
typename T2>
996 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
999 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1002 impl->SetArguments (a1, a2);
1005 template <
typename T1,
typename T2,
typename T3>
1014 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1017 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1020 impl->SetArguments (a1, a2, a3);
1023 template <
typename T1,
typename T2,
typename T3,
typename T4>
1033 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1036 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1039 impl->SetArguments (a1, a2, a3, a4);
1042 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1053 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1056 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1059 impl->SetArguments (a1, a2, a3, a4, a5);
1062 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1074 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1077 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1080 impl->SetArguments (a1, a2, a3, a4, a5, a6);
NS_FATAL_x macro definitions.
virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)=0
Bind the arguments to be used when the callback function is invoked.
Simulation virtual time values and global simulation resolution.
TypeTraits< typename TypeTraits< T >::ReferencedType >::NonConstType StoredType
Storage type for an argument.
TimerImpl specialization class for varying numbers of arguments.
TimerImpl * MakeTimerImpl(FN fn)
Make a TimerImpl from a function pointer taking varying numbers of arguments.
TimerImpl specialization class for varying numbers of arguments.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)=0
Bind the arguments to be used when the callback function is invoked.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
ns3::Simulator declaration.
virtual void SetArguments(T1 a1, T2 a2)=0
Bind the arguments to be used when the callback function is invoked.
const StoredType & ParameterType
Parameter type for an argument.
Convert an integer into a type.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
virtual ~TimerImpl()
Destructor.
virtual void SetArguments(T1 a1, T2 a2, T3 a3)=0
Bind the arguments to be used when the callback function is invoked.
virtual EventId Schedule(const Time &delay)=0
Schedule the callback for a future time.
ns3::IntToType template class.
TimerImpl specialization class for varying numbers of arguments.
TimerImpl specialization class for varying numbers of arguments.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The timer implementation underlying Timer and Watchdog.
Helper for the MakeTimerImpl functions which take a class method.
Inspect a type to deduce its features.
virtual void SetArguments(T1 a1)=0
Bind the arguments to be used when the callback function is invoked.
TimerImpl specialization class for varying numbers of arguments.
An identifier for simulation events.
Type and reference traits for TimerImpl arguments.
virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4)=0
Bind the arguments to be used when the callback function is invoked.
virtual void Invoke(void)=0
Invoke the expire function.
void SetArgs(T1 a1)
Set the arguments to be used when invoking the expire function.
static T & GetReference(T *p)
Convert a pointer type to a reference.
ns3::TypeTraits introspection declaration and template implementation.