131 static std::string
Demangle (
const std::string& mangled);
138 template <
typename T>
141 std::string typeName;
144 typeName =
typeid (T).name ();
147 catch (
const std::bad_typeid &e)
149 typeName = e.what ();
162template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
186 static std::string
id =
"CallbackImpl<" +
193template <
typename R,
typename T1>
207 static std::string
id =
"CallbackImpl<" +
208 GetCppTypeid<R> () +
"," +
209 GetCppTypeid<T1> () +
215template <
typename R,
typename T1,
typename T2>
229 static std::string
id =
"CallbackImpl<" +
230 GetCppTypeid<R> () +
"," +
231 GetCppTypeid<T1> () +
"," +
232 GetCppTypeid<T2> () +
238template <
typename R,
typename T1,
typename T2,
typename T3>
252 static std::string
id =
"CallbackImpl<" +
253 GetCppTypeid<R> () +
"," +
254 GetCppTypeid<T1> () +
"," +
255 GetCppTypeid<T2> () +
"," +
256 GetCppTypeid<T3> () +
262template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
276 static std::string
id =
"CallbackImpl<" +
277 GetCppTypeid<R> () +
"," +
278 GetCppTypeid<T1> () +
"," +
279 GetCppTypeid<T2> () +
"," +
280 GetCppTypeid<T3> () +
"," +
281 GetCppTypeid<T4> () +
287template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
301 static std::string
id =
"CallbackImpl<" +
302 GetCppTypeid<R> () +
"," +
303 GetCppTypeid<T1> () +
"," +
304 GetCppTypeid<T2> () +
"," +
305 GetCppTypeid<T3> () +
"," +
306 GetCppTypeid<T4> () +
"," +
307 GetCppTypeid<T5> () +
313template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
327 static std::string
id =
"CallbackImpl<" +
328 GetCppTypeid<R> () +
"," +
329 GetCppTypeid<T1> () +
"," +
330 GetCppTypeid<T2> () +
"," +
331 GetCppTypeid<T3> () +
"," +
332 GetCppTypeid<T4> () +
"," +
333 GetCppTypeid<T5> () +
"," +
334 GetCppTypeid<T6> () +
340template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
354 static std::string
id =
"CallbackImpl<" +
355 GetCppTypeid<R> () +
"," +
356 GetCppTypeid<T1> () +
"," +
357 GetCppTypeid<T2> () +
"," +
358 GetCppTypeid<T3> () +
"," +
359 GetCppTypeid<T4> () +
"," +
360 GetCppTypeid<T5> () +
"," +
361 GetCppTypeid<T6> () +
"," +
362 GetCppTypeid<T7> () +
368template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
382 static std::string
id =
"CallbackImpl<" +
383 GetCppTypeid<R> () +
"," +
384 GetCppTypeid<T1> () +
"," +
385 GetCppTypeid<T2> () +
"," +
386 GetCppTypeid<T3> () +
"," +
387 GetCppTypeid<T4> () +
"," +
388 GetCppTypeid<T5> () +
"," +
389 GetCppTypeid<T6> () +
"," +
390 GetCppTypeid<T7> () +
"," +
391 GetCppTypeid<T8> () +
397template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
403 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0;
411 static std::string
id =
"CallbackImpl<" +
412 GetCppTypeid<R> () +
"," +
413 GetCppTypeid<T1> () +
"," +
414 GetCppTypeid<T2> () +
"," +
415 GetCppTypeid<T3> () +
"," +
416 GetCppTypeid<T4> () +
"," +
417 GetCppTypeid<T5> () +
"," +
418 GetCppTypeid<T6> () +
"," +
419 GetCppTypeid<T7> () +
"," +
420 GetCppTypeid<T8> () +
"," +
421 GetCppTypeid<T9> () +
434template <
typename T,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
545 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
547 return m_functor (a1,a2,a3,a4,a5,a6,a7,a8);
561 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9)
563 return m_functor (a1,a2,a3,a4,a5,a6,a7,a8,a9);
574 FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
575 dynamic_cast<FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *
> (
PeekPointer (other));
576 if (otherDerived == 0)
597template <
typename OBJ_PTR,
typename MEM_PTR,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
709 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
725 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9)
738 MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
739 dynamic_cast<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *
> (
PeekPointer (other));
740 if (otherDerived == 0)
763template <
typename T,
typename R,
typename TX,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
776 template <
typename FUNCTOR,
typename ARG>
879 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
892 BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *otherDerived =
893 dynamic_cast<BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *
> (
PeekPointer (other));
894 if (otherDerived == 0)
899 || otherDerived->
m_a !=
m_a)
918template <
typename T,
typename R,
typename TX1,
typename TX2,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
934 template <
typename FUNCTOR,
typename ARG1,
typename ARG2>
1035 TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *otherDerived =
1036 dynamic_cast<TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *
> (
PeekPointer (other));
1037 if (otherDerived == 0)
1063template <
typename T,
typename R,
typename TX1,
typename TX2,
typename TX3,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1082 template <
typename FUNCTOR,
typename ARG1,
typename ARG2,
typename ARG3>
1169 ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *otherDerived =
1170 dynamic_cast<ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *
> (
PeekPointer (other));
1171 if (otherDerived == 0)
1277 typename T9 =
empty>
1294 template <
typename FUNCTOR>
1296 :
CallbackBase (
Create<
FunctorCallbackImpl<FUNCTOR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (functor))
1307 template <
typename OBJ_PTR,
typename MEM_PTR>
1309 :
CallbackBase (
Create<
MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (objPtr, memPtr))
1328 template <
typename T>
1334 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1335 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a),
false);
1348 template <
typename TX1,
typename TX2>
1354 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1355 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a1, a2),
false);
1370 template <
typename TX1,
typename TX2,
typename TX3>
1376 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1377 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a1, a2, a3),
false);
1466 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6);
1478 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7)
const
1480 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7);
1493 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
const
1495 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8);
1509 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9)
const
1511 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8,a9);
1566 else if (other == 0)
1586 std::string othTid = other->GetTypeid ();
1588 NS_FATAL_ERROR_CONT (
"Incompatible types. (feed to \"c++filt -t\" if needed)" << std::endl <<
1589 "got=" << othTid << std::endl <<
1590 "expected=" << myTid);
1607template <
typename R,
typename T1,
typename T2,
1608 typename T3,
typename T4,
1609 typename T5,
typename T6,
1610 typename T7,
typename T8,
1612bool operator != (
Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> a,
Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> b)
1647template <
typename T,
typename OBJ,
typename R,
typename... Ts>
1650 return Callback<R,Ts...> (objPtr, memPtr);
1652template <
typename T,
typename OBJ,
typename R,
typename... Ts>
1653Callback<R,Ts...>
MakeCallback (R (T::*memPtr)(Ts...)
const, OBJ objPtr)
1655 return Callback<R,Ts...> (objPtr, memPtr);
1670template <
typename R,
typename... Ts>
1673 return Callback<R,Ts...> (fnPtr,
true,
true);
1687template <
typename R,
typename... Ts>
1708template <
typename R,
typename TX,
typename ARG>
1712 Create<
BoundFunctorCallbackImpl<R (*)(
TX),R,
TX,
empty,
empty,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1715template <
typename R,
typename TX,
typename ARG,
1720 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1),R,
TX,T1,
empty,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1723template <
typename R,
typename TX,
typename ARG,
1724 typename T1,
typename T2>
1728 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2),R,
TX,T1,T2,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1731template <
typename R,
typename TX,
typename ARG,
1732 typename T1,
typename T2,
typename T3>
1736 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3),R,
TX,T1,T2,T3,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1739template <
typename R,
typename TX,
typename ARG,
1740 typename T1,
typename T2,
typename T3,
typename T4>
1744 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4),R,
TX,T1,T2,T3,T4,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1747template <
typename R,
typename TX,
typename ARG,
1748 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1749Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5), ARG a1)
1752 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5),R,
TX,T1,T2,T3,T4,T5,
empty,
empty,
empty> > (fnPtr, a1);
1755template <
typename R,
typename TX,
typename ARG,
1756 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1757Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5,T6), ARG a1)
1760 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5,T6),R,
TX,T1,T2,T3,T4,T5,T6,
empty,
empty> > (fnPtr, a1);
1763template <
typename R,
typename TX,
typename ARG,
1764 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1765Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5,T6,T7), ARG a1)
1768 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5,T6,T7),R,
TX,T1,T2,T3,T4,T5,T6,T7,
empty> > (fnPtr, a1);
1771template <
typename R,
typename TX,
typename ARG,
1772 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1773Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a1)
1776 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5,T6,T7,T8),R,
TX,T1,T2,T3,T4,T5,T6,T7,T8> > (fnPtr, a1);
1797template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2>
1801 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2),R,TX1,TX2,
empty,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1804template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1809 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1),R,TX1,TX2,T1,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1812template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1813 typename T1,
typename T2>
1817 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2),R,TX1,TX2,T1,T2,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1820template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1821 typename T1,
typename T2,
typename T3>
1825 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3),R,TX1,TX2,T1,T2,T3,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1828template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1829 typename T1,
typename T2,
typename T3,
typename T4>
1830Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4), ARG1 a1, ARG2 a2)
1833 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4),R,TX1,TX2,T1,T2,T3,T4,
empty,
empty,
empty> > (fnPtr, a1, a2);
1836template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1837 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1838Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2)
1841 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5),R,TX1,TX2,T1,T2,T3,T4,T5,
empty,
empty> > (fnPtr, a1, a2);
1844template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1845 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1846Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2)
1849 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5,T6),R,TX1,TX2,T1,T2,T3,T4,T5,T6,
empty> > (fnPtr, a1, a2);
1852template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1853 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1854Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6,T7), ARG1 a1, ARG2 a2)
1857 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5,T6,T7),R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> > (fnPtr, a1, a2);
1881template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3>
1885 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3),R,TX1,TX2,TX3,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1888template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1893 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1),R,TX1,TX2,TX3,T1,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1896template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1897 typename T1,
typename T2>
1901 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2),R,TX1,TX2,TX3,T1,T2,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1904template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1905 typename T1,
typename T2,
typename T3>
1906Callback<R,T1,T2,T3> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3), ARG1 a1, ARG2 a2, ARG3 a3)
1909 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3),R,TX1,TX2,TX3,T1,T2,T3,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1912template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1913 typename T1,
typename T2,
typename T3,
typename T4>
1914Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4), ARG1 a1, ARG2 a2, ARG3 a3)
1917 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4),R,TX1,TX2,TX3,T1,T2,T3,T4,
empty,
empty> > (fnPtr, a1, a2, a3);
1920template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1921 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1922Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2, ARG3 a3)
1925 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4,T5),R,TX1,TX2,TX3,T1,T2,T3,T4,T5,
empty> > (fnPtr, a1, a2, a3);
1928template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1929 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1930Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2, ARG3 a3)
1933 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4,T5,T6),R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> > (fnPtr, a1, a2, a3);
1958 template <
typename T>
1989template <
typename T>
1992 if (value.CheckType (
m_value))
Attribute helper (ATTRIBUTE_ )macros definition.
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
Hold a value for an Attribute.
CallbackImpl for functors with first argument bound at construction.
virtual ~BoundFunctorCallbackImpl()
R operator()(void)
Functor with varying numbers of arguments.
TypeTraits< TX >::ReferencedType m_a
the bound argument
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
BoundFunctorCallbackImpl(FUNCTOR functor, ARG a)
Construct from functor and a bound argument.
Base class for Callback class.
CallbackBase(Ptr< CallbackImplBase > impl)
Construct from a pimpl.
Ptr< CallbackImplBase > GetImpl(void) const
Ptr< CallbackImplBase > m_impl
the pimpl
Callback(Ptr< CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > > const &impl)
Construct from a CallbackImpl pointer.
R operator()(void) const
Functor with varying numbers of arguments.
bool Assign(const CallbackBase &other)
Adopt the other's implementation, if type compatible.
bool DoAssign(Ptr< const CallbackImplBase > other)
Adopt the other's implementation, if type compatible.
bool IsNull(void) const
Check for null implementation.
Callback(OBJ_PTR const &objPtr, MEM_PTR memPtr)
Construct a member function pointer call back.
Callback< R, T2, T3, T4, T5, T6, T7, T8, T9 > Bind(T a)
Bind the first arguments.
Callback< R, T3, T4, T5, T6, T7, T8, T9 > TwoBind(TX1 a1, TX2 a2)
Bind the first two arguments.
bool DoCheckType(Ptr< const CallbackImplBase > other) const
Check for compatible types.
CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > * DoPeekImpl(void) const
Callback(FUNCTOR const &functor, bool, bool)
Construct a functor call back, supporting operator() calls.
bool CheckType(const CallbackBase &other) const
Check for compatible types.
void Nullify(void)
Discard the implementation, set it to null.
Callback< R, T4, T5, T6, T7, T8, T9 > ThreeBind(TX1 a1, TX2 a2, TX3 a3)
Bind the first three arguments.
bool IsEqual(const CallbackBase &other) const
Equality test.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
Abstract base class for CallbackImpl Provides reference counting and equality test.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const =0
Equality test.
static std::string GetCppTypeid(void)
Helper to get the C++ typeid as a string.
virtual ~CallbackImplBase()
Virtual destructor.
virtual std::string GetTypeid(void) const =0
Get the name of this object type.
static std::string Demangle(const std::string &mangled)
The unqualified CallbackImpl class.
virtual R operator()(T1, T2, T3, T4, T5, T6, T7, T8, T9)=0
virtual std::string GetTypeid(void) const
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
AttributeValue implementation for Callback.
virtual std::string SerializeToString(Ptr< const AttributeChecker > checker) const
Serialize to string.
void Set(CallbackBase base)
CallbackValue()
Constructor.
bool GetAccessor(T &value) const
Access the Callback value as type T.
virtual Ptr< AttributeValue > Copy(void) const
virtual ~CallbackValue()
Destructor.
virtual bool DeserializeFromString(std::string value, Ptr< const AttributeChecker > checker)
Deserialize from string (not implemented)
CallbackBase m_value
The stored Callback instance.
CallbackImpl with functors.
R operator()(void)
Functor with varying numbers of arguments.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
virtual ~FunctorCallbackImpl()
FunctorCallbackImpl(T const &functor)
Construct from a functor.
CallbackImpl for pointer to member functions.
R operator()(void)
Functor with varying numbers of arguments.
MEM_PTR m_memPtr
the member function pointer
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
OBJ_PTR const m_objPtr
the object pointer
MemPtrCallbackImpl(OBJ_PTR const &objPtr, MEM_PTR memPtr)
Construct from an object pointer and member function pointer.
virtual ~MemPtrCallbackImpl()
Smart pointer class similar to boost::intrusive_ptr.
A template-based reference counting class.
CallbackImpl for functors with first three arguments bound at construction.
TypeTraits< TX1 >::ReferencedType m_a1
first bound argument
virtual ~ThreeBoundFunctorCallbackImpl()
R operator()(void)
Functor with varying numbers of arguments.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
TypeTraits< TX3 >::ReferencedType m_a3
third bound argument
TypeTraits< TX2 >::ReferencedType m_a2
second bound argument
ThreeBoundFunctorCallbackImpl(FUNCTOR functor, ARG1 arg1, ARG2 arg2, ARG3 arg3)
Construct from functor and three arguments.
CallbackImpl for functors with first two arguments bound at construction.
TwoBoundFunctorCallbackImpl(FUNCTOR functor, ARG1 arg1, ARG2 arg2)
Construct from functor and two arguments.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
TypeTraits< TX2 >::ReferencedType m_a2
second bound argument
TypeTraits< TX1 >::ReferencedType m_a1
first bound argument
virtual ~TwoBoundFunctorCallbackImpl()
R operator()(void)
Functor with varying numbers of arguments.
make Callback use a separate empty type
ns3::empty declaration, used by callbacks.
NS_FATAL_x macro definitions.
#define ATTRIBUTE_ACCESSOR_DEFINE(type)
Define the attribute accessor functions MakeTypeAccessor for class type.
#define ATTRIBUTE_CHECKER_DEFINE(type)
Declare the AttributeChecker class typeChecker and the MaketypeChecker function for class type.
Callback< R, Ts... > MakeNullCallback(void)
#define NS_FATAL_ERROR_CONT(msg)
Report a fatal error with a message, deferring termination.
#define NS_FATAL_ERROR_NO_MSG()
Report a fatal error and terminate.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
ns3::Ptr smart pointer declaration and implementation.
ns3::SimpleRefCount declaration and template implementation.
static T & GetReference(T *const p)
Trait class to convert a pointer into a reference, used by MemPtrCallBackImpl.
Inspect a type to deduce its features.
ns3::TypeTraits introspection declaration and template implementation.
@ TX
The PHY layer is sending a packet.