57 template <
typename T1>
65 template <
typename T1,
typename T2>
75 template <
typename T1,
typename T2,
typename T3>
76 void SetArgs (T1 a1, T2 a2, T3 a3);
87 template <
typename T1,
typename T2,
typename T3,
89 void SetArgs (T1 a1, T2 a2, T3 a3, T4 a4);
102 template <
typename T1,
typename T2,
typename T3,
103 typename T4,
typename T5>
104 void SetArgs (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
119 template <
typename T1,
typename T2,
typename T3,
120 typename T4,
typename T5,
typename T6>
121 void SetArgs (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6);
132 virtual void Invoke (
void) = 0;
151 template <
typename T1>
162 template <
typename T1,
typename T2>
174 template <
typename T1,
typename T2,
typename T3>
187 template <
typename T1,
typename T2,
typename T3,
typename T4>
198 virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4) = 0;
201 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
213 virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4, T5 a5) = 0;
216 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
229 virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4, T5 a5, T6 a6) = 0;
234 template <
typename T>
250 template <
typename FN>
262 template <
typename FN>
266 struct FnTimerImplZero :
public TimerImpl 268 FnTimerImplZero (FN fn)
275 virtual void Invoke (
void)
280 } *
function =
new FnTimerImplZero (fn);
288 template <
typename FN>
296 struct FnTimerImplOne :
public TimerImplOne<T1Parameter>
298 FnTimerImplOne (FN fn)
301 virtual void SetArguments (T1Parameter a1)
309 virtual void Invoke (
void)
315 } *
function =
new FnTimerImplOne (fn);
323 template <
typename FN>
334 struct FnTimerImplTwo :
public TimerImplTwo<T1Parameter,T2Parameter>
336 FnTimerImplTwo (FN fn)
339 virtual void SetArguments (T1Parameter a1, T2Parameter a2)
348 virtual void Invoke (
void)
355 } *
function =
new FnTimerImplTwo (fn);
363 template <
typename FN>
377 struct FnTimerImplThree :
public TimerImplThree<T1Parameter,T2Parameter,T3Parameter>
379 FnTimerImplThree (FN fn)
382 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3)
392 virtual void Invoke (
void)
394 m_fn (m_a1, m_a2, m_a3);
400 } *
function =
new FnTimerImplThree (fn);
408 template <
typename FN>
425 struct FnTimerImplFour :
public TimerImplFour<T1Parameter,T2Parameter,T3Parameter,T4Parameter>
427 FnTimerImplFour (FN fn)
430 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4)
441 virtual void Invoke (
void)
443 m_fn (m_a1, m_a2, m_a3, m_a4);
450 } *
function =
new FnTimerImplFour (fn);
458 template <
typename FN>
478 struct FnTimerImplFive :
public TimerImplFive<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter>
480 FnTimerImplFive (FN fn)
483 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4, T5Parameter a5)
495 virtual void Invoke (
void)
497 m_fn (m_a1, m_a2, m_a3, m_a4, m_a5);
505 } *
function =
new FnTimerImplFive (fn);
513 template <
typename FN>
536 struct FnTimerImplSix :
public TimerImplSix<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter,T6Parameter>
538 FnTimerImplSix (FN fn)
541 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4, T5Parameter a5, T6Parameter a6)
554 virtual void Invoke (
void)
556 m_fn (m_a1, m_a2, m_a3, m_a4, m_a5, m_a6);
565 } *
function =
new FnTimerImplSix (fn);
579 template <
typename T>
592 template <
typename T>
617 template <
typename MEM_PTR,
typename OBJ_PTR>
629 template <
typename MEM_PTR,
typename OBJ_PTR>
633 struct MemFnTimerImplZero :
public TimerImpl 635 MemFnTimerImplZero (MEM_PTR memPtr, OBJ_PTR objPtr)
643 virtual void Invoke (
void)
649 } *
function =
new MemFnTimerImplZero (memPtr, objPtr);
657 template <
typename MEM_PTR,
typename OBJ_PTR>
665 struct MemFnTimerImplOne :
public TimerImplOne<T1Parameter>
667 MemFnTimerImplOne (MEM_PTR memPtr, OBJ_PTR objPtr)
671 virtual void SetArguments (T1Parameter a1)
679 virtual void Invoke (
void)
686 } *
function =
new MemFnTimerImplOne (memPtr, objPtr);
694 template <
typename MEM_PTR,
typename OBJ_PTR>
705 struct MemFnTimerImplTwo :
public TimerImplTwo<T1Parameter,T2Parameter>
707 MemFnTimerImplTwo (MEM_PTR memPtr, OBJ_PTR objPtr)
711 virtual void SetArguments (T1Parameter a1, T2Parameter a2)
720 virtual void Invoke (
void)
728 } *
function =
new MemFnTimerImplTwo (memPtr, objPtr);
736 template <
typename MEM_PTR,
typename OBJ_PTR>
750 struct MemFnTimerImplThree :
public TimerImplThree<T1Parameter,T2Parameter,T3Parameter>
752 MemFnTimerImplThree (MEM_PTR memPtr, OBJ_PTR objPtr)
756 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3)
766 virtual void Invoke (
void)
775 } *
function =
new MemFnTimerImplThree (memPtr, objPtr);
783 template <
typename MEM_PTR,
typename OBJ_PTR>
800 struct MemFnTimerImplFour :
public TimerImplFour<T1Parameter,T2Parameter,T3Parameter,T4Parameter>
802 MemFnTimerImplFour (MEM_PTR memPtr, OBJ_PTR objPtr)
806 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4)
817 virtual void Invoke (
void)
827 } *
function =
new MemFnTimerImplFour (memPtr, objPtr);
835 template <
typename MEM_PTR,
typename OBJ_PTR>
855 struct MemFnTimerImplFive :
public TimerImplFive<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter>
857 MemFnTimerImplFive (MEM_PTR memPtr, OBJ_PTR objPtr)
861 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4,T5Parameter a5)
873 virtual void Invoke (
void)
884 } *
function =
new MemFnTimerImplFive (memPtr, objPtr);
892 template <
typename MEM_PTR,
typename OBJ_PTR>
915 struct MemFnTimerImplSix :
public TimerImplSix<T1Parameter,T2Parameter,T3Parameter,T4Parameter,T5Parameter,T6Parameter>
917 MemFnTimerImplSix (MEM_PTR memPtr, OBJ_PTR objPtr)
921 virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4,T5Parameter a5,T6Parameter a6)
932 return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4, m_a5, m_a6);
934 virtual void Invoke (
void)
946 } *
function =
new MemFnTimerImplSix (memPtr, objPtr);
957 template <
typename T1>
964 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
967 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
970 impl->SetArguments (a1);
973 template <
typename T1,
typename T2>
981 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
984 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
987 impl->SetArguments (a1, a2);
990 template <
typename T1,
typename T2,
typename T3>
999 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1002 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1005 impl->SetArguments (a1, a2, a3);
1008 template <
typename T1,
typename T2,
typename T3,
typename T4>
1018 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1021 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1024 impl->SetArguments (a1, a2, a3, a4);
1027 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1038 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1041 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1044 impl->SetArguments (a1, a2, a3, a4, a5);
1047 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1059 TimerImplBase *impl = dynamic_cast<TimerImplBase *> (this);
1062 NS_FATAL_ERROR (
"You tried to set Timer arguments incompatible with its function.");
1065 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.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
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.
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.