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 ();
162 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
172 template <
typename R>
186 static std::string
id =
"CallbackImpl<" +
193 template <
typename R,
typename T1>
207 static std::string
id =
"CallbackImpl<" +
208 GetCppTypeid<R> () +
"," +
209 GetCppTypeid<T1> () +
215 template <
typename R,
typename T1,
typename T2>
229 static std::string
id =
"CallbackImpl<" +
230 GetCppTypeid<R> () +
"," +
231 GetCppTypeid<T1> () +
"," +
232 GetCppTypeid<T2> () +
238 template <
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> () +
262 template <
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> () +
287 template <
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> () +
313 template <
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> () +
340 template <
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> () +
368 template <
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> () +
397 template <
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> () +
434 template <
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)
597 template <
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)
763 template <
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)
918 template <
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)
1063 template <
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)
1272 template<
typename R,
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)
1580 std::string othTid = other->GetTypeid ();
1582 NS_FATAL_ERROR_CONT (
"Incompatible types. (feed to \"c++filt -t\" if needed)" << std::endl <<
1583 "got=" << othTid << std::endl <<
1584 "expected=" << myTid);
1601 template <
typename R,
typename T1,
typename T2,
1602 typename T3,
typename T4,
1603 typename T5,
typename T6,
1604 typename T7,
typename T8,
1606 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)
1641 template <
typename T,
typename OBJ,
typename R,
typename... Ts>
1644 return Callback<R,Ts...> (objPtr, memPtr);
1646 template <
typename T,
typename OBJ,
typename R,
typename... Ts>
1647 Callback<R,Ts...>
MakeCallback (R (T::*memPtr)(Ts...)
const, OBJ objPtr)
1649 return Callback<R,Ts...> (objPtr, memPtr);
1664 template <
typename R,
typename... Ts>
1667 return Callback<R,Ts...> (fnPtr,
true,
true);
1681 template <
typename R,
typename... Ts>
1702 template <
typename R,
typename TX,
typename ARG>
1706 Create<
BoundFunctorCallbackImpl<R (*)(
TX),R,
TX,
empty,
empty,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1709 template <
typename R,
typename TX,
typename ARG,
1714 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1),R,
TX,T1,
empty,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1717 template <
typename R,
typename TX,
typename ARG,
1718 typename T1,
typename T2>
1722 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2),R,
TX,T1,T2,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1725 template <
typename R,
typename TX,
typename ARG,
1726 typename T1,
typename T2,
typename T3>
1730 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3),R,
TX,T1,T2,T3,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1733 template <
typename R,
typename TX,
typename ARG,
1734 typename T1,
typename T2,
typename T3,
typename T4>
1738 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4),R,
TX,T1,T2,T3,T4,
empty,
empty,
empty,
empty> > (fnPtr, a1);
1741 template <
typename R,
typename TX,
typename ARG,
1742 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1743 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5), ARG a1)
1746 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5),R,
TX,T1,T2,T3,T4,T5,
empty,
empty,
empty> > (fnPtr, a1);
1749 template <
typename R,
typename TX,
typename ARG,
1750 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1751 Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5,T6), ARG a1)
1754 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5,T6),R,
TX,T1,T2,T3,T4,T5,T6,
empty,
empty> > (fnPtr, a1);
1757 template <
typename R,
typename TX,
typename ARG,
1758 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1759 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5,T6,T7), ARG a1)
1762 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5,T6,T7),R,
TX,T1,T2,T3,T4,T5,T6,T7,
empty> > (fnPtr, a1);
1765 template <
typename R,
typename TX,
typename ARG,
1766 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1767 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(
TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a1)
1770 Create<
BoundFunctorCallbackImpl<R (*)(
TX,T1,T2,T3,T4,T5,T6,T7,T8),R,
TX,T1,T2,T3,T4,T5,T6,T7,T8> > (fnPtr, a1);
1791 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2>
1795 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2),R,TX1,TX2,
empty,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1798 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1803 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1),R,TX1,TX2,T1,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1806 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1807 typename T1,
typename T2>
1811 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2),R,TX1,TX2,T1,T2,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1814 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1815 typename T1,
typename T2,
typename T3>
1819 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3),R,TX1,TX2,T1,T2,T3,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2);
1822 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1823 typename T1,
typename T2,
typename T3,
typename T4>
1824 Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4), ARG1 a1, ARG2 a2)
1827 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4),R,TX1,TX2,T1,T2,T3,T4,
empty,
empty,
empty> > (fnPtr, a1, a2);
1830 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1831 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1832 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2)
1835 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5),R,TX1,TX2,T1,T2,T3,T4,T5,
empty,
empty> > (fnPtr, a1, a2);
1838 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1839 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1840 Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2)
1843 Create<
TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5,T6),R,TX1,TX2,T1,T2,T3,T4,T5,T6,
empty> > (fnPtr, a1, a2);
1846 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1847 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1848 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6,T7), ARG1 a1, ARG2 a2)
1851 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);
1875 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3>
1879 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3),R,TX1,TX2,TX3,
empty,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1882 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1887 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1),R,TX1,TX2,TX3,T1,
empty,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1890 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1891 typename T1,
typename T2>
1895 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2),R,TX1,TX2,TX3,T1,T2,
empty,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1898 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1899 typename T1,
typename T2,
typename T3>
1900 Callback<R,T1,T2,T3> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3), ARG1 a1, ARG2 a2, ARG3 a3)
1903 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3),R,TX1,TX2,TX3,T1,T2,T3,
empty,
empty,
empty> > (fnPtr, a1, a2, a3);
1906 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1907 typename T1,
typename T2,
typename T3,
typename T4>
1908 Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4), ARG1 a1, ARG2 a2, ARG3 a3)
1911 Create<
ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4),R,TX1,TX2,TX3,T1,T2,T3,T4,
empty,
empty> > (fnPtr, a1, a2, a3);
1914 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1915 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1916 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2, ARG3 a3)
1919 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);
1922 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1923 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1924 Callback<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)
1927 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>
1988 template <
typename T>
1991 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 > m_impl
the pimpl
Ptr< CallbackImplBase > GetImpl(void) const
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.
bool DoCheckType(Ptr< const CallbackImplBase > other) const
Check for compatible types.
Callback(FUNCTOR const &functor, bool, bool)
Construct a functor call back, supporting operator() calls.
CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > * DoPeekImpl(void) const
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 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
Give value my callback, if type compatible.
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 CallbackBase
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.
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...
U * PeekPointer(const Ptr< U > &p)
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.