112 template <
typename T>
121 template <
typename T>
155 virtual std::string
GetTypeid (
void)
const = 0;
162 static std::string
Demangle (
const std::string& mangled);
169 template <
typename T>
172 std::string typeName;
175 typeName =
typeid (T).name ();
178 catch (
const std::bad_typeid &e)
180 typeName = e.what ();
190 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
200 template <
typename R>
212 static std::string
id =
"CallbackImpl<" +
219 template <
typename R,
typename T1>
231 static std::string
id =
"CallbackImpl<" +
232 GetCppTypeid<R> () +
"," +
233 GetCppTypeid<T1> () +
239 template <
typename R,
typename T1,
typename T2>
251 static std::string
id =
"CallbackImpl<" +
252 GetCppTypeid<R> () +
"," +
253 GetCppTypeid<T1> () +
"," +
254 GetCppTypeid<T2> () +
260 template <
typename R,
typename T1,
typename T2,
typename T3>
272 static std::string
id =
"CallbackImpl<" +
273 GetCppTypeid<R> () +
"," +
274 GetCppTypeid<T1> () +
"," +
275 GetCppTypeid<T2> () +
"," +
276 GetCppTypeid<T3> () +
282 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
294 static std::string
id =
"CallbackImpl<" +
295 GetCppTypeid<R> () +
"," +
296 GetCppTypeid<T1> () +
"," +
297 GetCppTypeid<T2> () +
"," +
298 GetCppTypeid<T3> () +
"," +
299 GetCppTypeid<T4> () +
305 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
309 virtual R
operator() (T1, T2, T3, T4, T5) = 0;
317 static std::string
id =
"CallbackImpl<" +
318 GetCppTypeid<R> () +
"," +
319 GetCppTypeid<T1> () +
"," +
320 GetCppTypeid<T2> () +
"," +
321 GetCppTypeid<T3> () +
"," +
322 GetCppTypeid<T4> () +
"," +
323 GetCppTypeid<T5> () +
329 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
333 virtual R
operator() (T1, T2, T3, T4, T5, T6) = 0;
341 static std::string
id =
"CallbackImpl<" +
342 GetCppTypeid<R> () +
"," +
343 GetCppTypeid<T1> () +
"," +
344 GetCppTypeid<T2> () +
"," +
345 GetCppTypeid<T3> () +
"," +
346 GetCppTypeid<T4> () +
"," +
347 GetCppTypeid<T5> () +
"," +
348 GetCppTypeid<T6> () +
354 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
358 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7) = 0;
366 static std::string
id =
"CallbackImpl<" +
367 GetCppTypeid<R> () +
"," +
368 GetCppTypeid<T1> () +
"," +
369 GetCppTypeid<T2> () +
"," +
370 GetCppTypeid<T3> () +
"," +
371 GetCppTypeid<T4> () +
"," +
372 GetCppTypeid<T5> () +
"," +
373 GetCppTypeid<T6> () +
"," +
374 GetCppTypeid<T7> () +
380 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
384 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7, T8) = 0;
392 static std::string
id =
"CallbackImpl<" +
393 GetCppTypeid<R> () +
"," +
394 GetCppTypeid<T1> () +
"," +
395 GetCppTypeid<T2> () +
"," +
396 GetCppTypeid<T3> () +
"," +
397 GetCppTypeid<T4> () +
"," +
398 GetCppTypeid<T5> () +
"," +
399 GetCppTypeid<T6> () +
"," +
400 GetCppTypeid<T7> () +
"," +
401 GetCppTypeid<T8> () +
407 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
408 class CallbackImpl :
public CallbackImplBase {
411 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0;
419 static std::string
id =
"CallbackImpl<" +
420 GetCppTypeid<R> () +
"," +
421 GetCppTypeid<T1> () +
"," +
422 GetCppTypeid<T2> () +
"," +
423 GetCppTypeid<T3> () +
"," +
424 GetCppTypeid<T4> () +
"," +
425 GetCppTypeid<T5> () +
"," +
426 GetCppTypeid<T6> () +
"," +
427 GetCppTypeid<T7> () +
"," +
428 GetCppTypeid<T8> () +
"," +
429 GetCppTypeid<T9> () +
441 template <
typename T,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
541 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
542 return m_functor (a1,a2,a3,a4,a5,a6,a7,a8);
556 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) {
557 return m_functor (a1,a2,a3,a4,a5,a6,a7,a8,a9);
567 FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
568 dynamic_cast<FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *
> (
PeekPointer (other));
569 if (otherDerived == 0)
587 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>
688 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
703 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) {
714 MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
715 dynamic_cast<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *
> (
PeekPointer (other));
716 if (otherDerived == 0)
736 template <
typename T,
typename R,
typename TX,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
744 template <
typename FUNCTOR,
typename ARG>
837 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
848 BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *otherDerived =
849 dynamic_cast<BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *
> (
PeekPointer (other));
850 if (otherDerived == 0)
870 template <
typename T,
typename R,
typename TX1,
typename TX2,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
879 template <
typename FUNCTOR,
typename ARG1,
typename ARG2>
969 TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *otherDerived =
970 dynamic_cast<TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *
> (
PeekPointer (other));
971 if (otherDerived == 0)
992 template <
typename T,
typename R,
typename TX1,
typename TX2,
typename TX3,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1002 template <
typename FUNCTOR,
typename ARG1,
typename ARG2,
typename ARG3>
1079 ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *otherDerived =
1080 dynamic_cast<ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *
> (
PeekPointer (other));
1081 if (otherDerived == 0)
1170 template<
typename R,
1175 typename T9 =
empty>
1189 template <
typename FUNCTOR>
1191 :
CallbackBase (
Create<
FunctorCallbackImpl<FUNCTOR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (functor))
1200 template <
typename OBJ_PTR,
typename MEM_PTR>
1202 :
CallbackBase (
Create<
MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (objPtr, memPtr))
1220 template <
typename T>
1225 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1226 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a),
false);
1237 template <
typename TX1,
typename TX2>
1242 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1243 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a1, a2),
false);
1255 template <
typename TX1,
typename TX2,
typename TX3>
1260 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1261 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a1, a2, a3),
false);
1341 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6);
1353 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7)
const {
1354 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7);
1367 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
const {
1368 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8);
1382 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9)
const {
1383 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8,a9);
1432 else if (other == 0)
1445 std::string othTid = other->GetTypeid ();
1447 NS_FATAL_ERROR_CONT (
"Incompatible types. (feed to \"c++filt -t\" if needed)" << std::endl <<
1448 "got=" << othTid << std::endl <<
1449 "expected=" << myTid);
1466 template <
typename R,
typename T1,
typename T2,
1467 typename T3,
typename T4,
1468 typename T5,
typename T6,
1469 typename T7,
typename T8,
1471 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)
1488 template <
typename T,
typename OBJ,
typename R>
1492 template <
typename T,
typename OBJ,
typename R>
1496 template <
typename T,
typename OBJ,
typename R,
typename T1>
1500 template <
typename T,
typename OBJ,
typename R,
typename T1>
1501 Callback<R,T1>
MakeCallback (R (T::*memPtr)(T1)
const, OBJ objPtr) {
1502 return Callback<R,T1> (objPtr, memPtr);
1504 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2>
1508 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2>
1509 Callback<R,T1,T2>
MakeCallback (R (T::*memPtr)(T1,T2)
const, OBJ objPtr) {
1510 return Callback<R,T1,T2> (objPtr, memPtr);
1512 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3>
1516 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3>
1517 Callback<R,T1,T2,T3>
MakeCallback (R (T::*memPtr)(T1,T2,T3)
const, OBJ objPtr) {
1518 return Callback<R,T1,T2,T3> (objPtr, memPtr);
1520 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1524 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1525 Callback<R,T1,T2,T3,T4>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4)
const, OBJ objPtr) {
1526 return Callback<R,T1,T2,T3,T4> (objPtr, memPtr);
1528 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1529 Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5), OBJ objPtr) {
1532 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1533 Callback<R,T1,T2,T3,T4,T5>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5)
const, OBJ objPtr) {
1534 return Callback<R,T1,T2,T3,T4,T5> (objPtr, memPtr);
1536 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1537 Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) {
1540 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1541 Callback<R,T1,T2,T3,T4,T5,T6>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6)
const, OBJ objPtr) {
1542 return Callback<R,T1,T2,T3,T4,T5,T6> (objPtr, memPtr);
1544 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1545 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) {
1548 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1549 Callback<R,T1,T2,T3,T4,T5,T6,T7>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7)
const, OBJ objPtr) {
1550 return Callback<R,T1,T2,T3,T4,T5,T6,T7> (objPtr, memPtr);
1552 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1553 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) {
1556 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1557 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8)
const, OBJ objPtr) {
1558 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (objPtr, memPtr);
1560 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
1561 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) {
1562 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, memPtr);
1564 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
1565 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9)
const, OBJ objPtr) {
1566 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, memPtr);
1581 template <
typename R>
1585 template <
typename R,
typename T1>
1589 template <
typename R,
typename T1,
typename T2>
1593 template <
typename R,
typename T1,
typename T2,
typename T3>
1597 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1601 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1605 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1606 Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6)) {
1609 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1610 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7)) {
1613 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1614 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8)) {
1615 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (fnPtr,
true,
true);
1617 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
1618 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9)) {
1619 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (fnPtr,
true,
true);
1634 template <
typename R>
1638 template <
typename R,
typename T1>
1642 template <
typename R,
typename T1,
typename T2>
1646 template <
typename R,
typename T1,
typename T2,
typename T3>
1650 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1654 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1658 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1662 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1666 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1670 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
1685 template <
typename R,
typename TX,
typename ARG>
1688 Create<BoundFunctorCallbackImpl<R (*)(TX),R,TX,empty,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a1);
1691 template <
typename R,
typename TX,
typename ARG,
1695 Create<BoundFunctorCallbackImpl<R (*)(TX,T1),R,TX,T1,empty,empty,empty,empty,empty,empty,empty> > (fnPtr, a1);
1698 template <
typename R,
typename TX,
typename ARG,
1699 typename T1,
typename T2>
1702 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2),R,TX,T1,T2,empty,empty,empty,empty,empty,empty> > (fnPtr, a1);
1705 template <
typename R,
typename TX,
typename ARG,
1706 typename T1,
typename T2,
typename T3>
1709 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3),R,TX,T1,T2,T3,empty,empty,empty,empty,empty> > (fnPtr, a1);
1712 template <
typename R,
typename TX,
typename ARG,
1713 typename T1,
typename T2,
typename T3,
typename T4>
1716 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4),R,TX,T1,T2,T3,T4,empty,empty,empty,empty> > (fnPtr, a1);
1719 template <
typename R,
typename TX,
typename ARG,
1720 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1721 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a1) {
1723 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5),R,TX,T1,T2,T3,T4,T5,empty,empty,empty> > (fnPtr, a1);
1726 template <
typename R,
typename TX,
typename ARG,
1727 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1728 Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a1) {
1730 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6),R,TX,T1,T2,T3,T4,T5,T6,empty,empty> > (fnPtr, a1);
1733 template <
typename R,
typename TX,
typename ARG,
1734 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1735 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a1) {
1737 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7),R,TX,T1,T2,T3,T4,T5,T6,T7,empty> > (fnPtr, a1);
1740 template <
typename R,
typename TX,
typename ARG,
1741 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1742 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a1) {
1744 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7,T8),R,TX,T1,T2,T3,T4,T5,T6,T7,T8> > (fnPtr, a1);
1758 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2>
1761 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2),R,TX1,TX2,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a1, a2);
1764 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1768 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1),R,TX1,TX2,T1,empty,empty,empty,empty,empty,empty> > (fnPtr, a1, a2);
1771 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1772 typename T1,
typename T2>
1775 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2),R,TX1,TX2,T1,T2,empty,empty,empty,empty,empty> > (fnPtr, a1, a2);
1778 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1779 typename T1,
typename T2,
typename T3>
1782 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3),R,TX1,TX2,T1,T2,T3,empty,empty,empty,empty> > (fnPtr, a1, a2);
1785 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1786 typename T1,
typename T2,
typename T3,
typename T4>
1787 Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4), ARG1 a1, ARG2 a2) {
1789 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4),R,TX1,TX2,T1,T2,T3,T4,empty,empty,empty> > (fnPtr, a1, a2);
1792 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1793 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1794 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2) {
1796 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5),R,TX1,TX2,T1,T2,T3,T4,T5,empty,empty> > (fnPtr, a1, a2);
1799 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1800 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1801 Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2) {
1803 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5,T6),R,TX1,TX2,T1,T2,T3,T4,T5,T6,empty> > (fnPtr, a1, a2);
1806 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1807 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1808 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) {
1810 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);
1825 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3>
1828 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3),R,TX1,TX2,TX3,empty,empty,empty,empty,empty,empty> >(fnPtr, a1, a2, a3);
1831 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1835 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1),R,TX1,TX2,TX3,T1,empty,empty,empty,empty,empty> > (fnPtr, a1, a2, a3);
1838 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1839 typename T1,
typename T2>
1842 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2),R,TX1,TX2,TX3,T1,T2,empty,empty,empty,empty> > (fnPtr, a1, a2, a3);
1845 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1846 typename T1,
typename T2,
typename T3>
1847 Callback<R,T1,T2,T3> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3), ARG1 a1, ARG2 a2, ARG3 a3) {
1849 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3),R,TX1,TX2,TX3,T1,T2,T3,empty,empty,empty> > (fnPtr, a1, a2, a3);
1852 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1853 typename T1,
typename T2,
typename T3,
typename T4>
1854 Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4), ARG1 a1, ARG2 a2, ARG3 a3) {
1856 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4),R,TX1,TX2,TX3,T1,T2,T3,T4,empty,empty> > (fnPtr, a1, a2, a3);
1859 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1860 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1861 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2, ARG3 a3) {
1863 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);
1866 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1867 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1868 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) {
1870 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);
1900 template <
typename T>
1929 template <
typename T>
1932 if (value.CheckType (
m_value))
NS_FATAL_x macro definitions.
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.
CallbackValue()
Constructor.
static std::string GetCppTypeid(void)
Helper to get the C++ typeid as a string.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_FATAL_ERROR_CONT(msg)
Report a fatal error with a message, deferring termination.
virtual ~MemPtrCallbackImpl()
virtual ~BoundFunctorCallbackImpl()
virtual ~FunctorCallbackImpl()
ns3::Ptr smart pointer declaration and implementation.
Hold a value for an Attribute.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const =0
Equality test.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Callback< R, T3, T4, T5, T6, T7, T8, T9 > TwoBind(TX1 a1, TX2 a2)
Bind the first two arguments.
bool IsNull(void) const
Check for null implementation.
static std::string DoGetTypeid(void)
Get the name of this object type.
U * PeekPointer(const Ptr< U > &p)
R operator()(void)
Functor with varying numbers of arguments.
Callback< R, T2, T3, T4, T5, T6, T7, T8, T9 > Bind(T a)
Bind the first arguments.
Base class for Callback class.
MemPtrCallbackImpl(OBJ_PTR const &objPtr, MEM_PTR memPtr)
Construct from an object pointer and member function pointer.
virtual std::string GetTypeid(void) const
Get the name of this object type.
virtual ~CallbackValue()
Destructor.
bool Assign(const CallbackBase &other)
Adopt the other's implementation, if type compatible.
virtual std::string GetTypeid(void) const
Get the name of this object type.
Callback< R > MakeNullCallback(void)
CallbackBase m_value
the CallbackBase
bool GetAccessor(T &value) const
Give value my callback, if type compatible.
virtual std::string GetTypeid(void) const
Get the name of this object type.
CallbackImpl for functors with first three arguments bound at construction.
bool DoAssign(Ptr< const CallbackImplBase > other)
Adopt the other's implementation, if type compatible.
static std::string Demangle(const std::string &mangled)
AttributeValue implementation for Callback.
The unqualified CallbackImpl class.
#define ATTRIBUTE_CHECKER_DEFINE(type)
Declare the AttributeChecker class typeChecker and the MaketypeChecker function for class type...
virtual std::string GetTypeid(void) const =0
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
R operator()(void)
Functor with varying numbers of arguments.
TypeTraits< TX >::ReferencedType m_a
the bound argument
make Callback use a separate empty type
R operator()(void)
Functor with varying numbers of arguments.
bool CheckType(const CallbackBase &other) const
Check for compatible types.
FunctorCallbackImpl(T const &functor)
Construct from a functor.
Trait class to convert a pointer into a reference, used by MemPtrCallBackImpl.
BoundFunctorCallbackImpl(FUNCTOR functor, ARG a)
Construct from functor and a bound argument.
OBJ_PTR const m_objPtr
the object pointer
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
MEM_PTR m_memPtr
the member function pointer
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
static std::string DoGetTypeid(void)
Get the name of this object type.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
CallbackImpl for pointer to member functions.
Callback< R, T4, T5, T6, T7, T8, T9 > ThreeBind(TX1 a1, TX2 a2, TX3 a3)
Bind the first three arguments.
bool DoCheckType(Ptr< const CallbackImplBase > other) const
Check for compatible types.
Abstract base class for CallbackImpl Provides reference counting and equality test.
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.
CallbackImpl for functors with first two arguments bound at construction.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
Callback(Ptr< CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > > const &impl)
Construct from a CallbackImpl pointer.
virtual std::string GetTypeid(void) const
Get the name of this object type.
R operator()(void) const
Functor with varying numbers of arguments.
virtual std::string GetTypeid(void) const
Get the name of this object type.
TypeTraits< TX3 >::ReferencedType m_a3
third bound argument
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.
virtual ~CallbackImplBase()
Virtual destructor.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsEqual(const CallbackBase &other) const
Equality test.
static std::string DoGetTypeid(void)
Get the name of this object type.
#define NS_FATAL_ERROR_NO_MSG()
Report a fatal error and terminate.
Ptr< T > Create(void)
Create class instances by constructors with varying numbers of arguments and return them by Ptr...
static T & GetReference(T *const p)
static std::string DoGetTypeid(void)
Get the name of this object type.
TypeTraits< TX1 >::ReferencedType m_a1
first bound argument
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.
Callback(OBJ_PTR const &objPtr, MEM_PTR memPtr)
Construct a member function pointer call back.
virtual ~ThreeBoundFunctorCallbackImpl()
Attribute helper (ATTRIBUTE_ )macros definition.
static std::string DoGetTypeid(void)
Get the name of this object type.
static std::string DoGetTypeid(void)
Get the name of this object type.
#define ATTRIBUTE_ACCESSOR_DEFINE(type)
Define the attribute accessor functions MakeTypeAccessor for class type.
R operator()(void)
Functor with varying numbers of arguments.
TypeTraits< TX1 >::ReferencedType m_a1
first bound argument
Inspect a type to deduce its features.
The PHY layer is sending a packet.
virtual std::string GetTypeid(void) const
Get the name of this object type.
Callback(FUNCTOR const &functor, bool, bool)
Construct a functor call back, supporting operator() calls.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
CallbackImpl for functors with first argument bound at construction.
TwoBoundFunctorCallbackImpl(FUNCTOR functor, ARG1 arg1, ARG2 arg2)
Construct from functor and two arguments.
CallbackImpl with functors.
virtual bool DeserializeFromString(std::string value, Ptr< const AttributeChecker > checker)
Deserialize from string (not implemented)
virtual R operator()(T1, T2, T3, T4, T5, T6, T7, T8, T9)=0
Abstract operator.
virtual std::string SerializeToString(Ptr< const AttributeChecker > checker) const
Serialize to string.
virtual bool IsEqual(Ptr< const CallbackImplBase > other) const
Equality test.
void Nullify(void)
Discard the implementation, set it to null.
ns3::empty declaration, used by callbacks.
virtual ~TwoBoundFunctorCallbackImpl()
TypeTraits< TX2 >::ReferencedType m_a2
second bound argument
CallbackBase(Ptr< CallbackImplBase > impl)
Construct from a pimpl.
A template-based reference counting class.
virtual Ptr< AttributeValue > Copy(void) const
CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > * DoPeekImpl(void) const
Ptr< CallbackImplBase > m_impl
the pimpl
void Set(CallbackBase base)
ns3::SimpleRefCount declaration and template implementation.
TypeTraits< TX2 >::ReferencedType m_a2
second bound argument
Ptr< CallbackImplBase > GetImpl(void) const
ns3::TypeTraits introspection declaration and template implementation.
ThreeBoundFunctorCallbackImpl(FUNCTOR functor, ARG1 arg1, ARG2 arg2, ARG3 arg3)
Construct from functor and three arguments.
R operator()(void)
Functor with varying numbers of arguments.