112 template <
typename T>
121 template <
typename T>
152 virtual std::string
GetTypeid (
void)
const = 0;
159 static std::string
Demangle (
const std::string& mangled);
167 template <
typename T>
170 std::string typeName;
173 typeName =
typeid (T).name ();
176 catch (
const std::bad_typeid &e)
178 typeName = e.what ();
188 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
198 template <
typename R>
209 static std::string
id =
"CallbackImpl<" +
216 template <
typename R,
typename T1>
227 static std::string
id =
"CallbackImpl<" +
228 GetCppTypeid<R> () +
"," +
229 GetCppTypeid<T1> () +
235 template <
typename R,
typename T1,
typename T2>
246 static std::string
id =
"CallbackImpl<" +
247 GetCppTypeid<R> () +
"," +
248 GetCppTypeid<T1> () +
"," +
249 GetCppTypeid<T2> () +
255 template <
typename R,
typename T1,
typename T2,
typename T3>
266 static std::string
id =
"CallbackImpl<" +
267 GetCppTypeid<R> () +
"," +
268 GetCppTypeid<T1> () +
"," +
269 GetCppTypeid<T2> () +
"," +
270 GetCppTypeid<T3> () +
276 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
287 static std::string
id =
"CallbackImpl<" +
288 GetCppTypeid<R> () +
"," +
289 GetCppTypeid<T1> () +
"," +
290 GetCppTypeid<T2> () +
"," +
291 GetCppTypeid<T3> () +
"," +
292 GetCppTypeid<T4> () +
298 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
302 virtual R
operator() (T1, T2, T3, T4, T5) = 0;
309 static std::string
id =
"CallbackImpl<" +
310 GetCppTypeid<R> () +
"," +
311 GetCppTypeid<T1> () +
"," +
312 GetCppTypeid<T2> () +
"," +
313 GetCppTypeid<T3> () +
"," +
314 GetCppTypeid<T4> () +
"," +
315 GetCppTypeid<T5> () +
321 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
325 virtual R
operator() (T1, T2, T3, T4, T5, T6) = 0;
332 static std::string
id =
"CallbackImpl<" +
333 GetCppTypeid<R> () +
"," +
334 GetCppTypeid<T1> () +
"," +
335 GetCppTypeid<T2> () +
"," +
336 GetCppTypeid<T3> () +
"," +
337 GetCppTypeid<T4> () +
"," +
338 GetCppTypeid<T5> () +
"," +
339 GetCppTypeid<T6> () +
345 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
349 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7) = 0;
356 static std::string
id =
"CallbackImpl<" +
357 GetCppTypeid<R> () +
"," +
358 GetCppTypeid<T1> () +
"," +
359 GetCppTypeid<T2> () +
"," +
360 GetCppTypeid<T3> () +
"," +
361 GetCppTypeid<T4> () +
"," +
362 GetCppTypeid<T5> () +
"," +
363 GetCppTypeid<T6> () +
"," +
364 GetCppTypeid<T7> () +
370 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
374 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7, T8) = 0;
381 static std::string
id =
"CallbackImpl<" +
382 GetCppTypeid<R> () +
"," +
383 GetCppTypeid<T1> () +
"," +
384 GetCppTypeid<T2> () +
"," +
385 GetCppTypeid<T3> () +
"," +
386 GetCppTypeid<T4> () +
"," +
387 GetCppTypeid<T5> () +
"," +
388 GetCppTypeid<T6> () +
"," +
389 GetCppTypeid<T7> () +
"," +
390 GetCppTypeid<T8> () +
396 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
397 class CallbackImpl :
public CallbackImplBase {
400 virtual R
operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0;
407 static std::string
id =
"CallbackImpl<" +
408 GetCppTypeid<R> () +
"," +
409 GetCppTypeid<T1> () +
"," +
410 GetCppTypeid<T2> () +
"," +
411 GetCppTypeid<T3> () +
"," +
412 GetCppTypeid<T4> () +
"," +
413 GetCppTypeid<T5> () +
"," +
414 GetCppTypeid<T6> () +
"," +
415 GetCppTypeid<T7> () +
"," +
416 GetCppTypeid<T8> () +
"," +
417 GetCppTypeid<T9> () +
429 template <
typename T,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
529 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
530 return m_functor (a1,a2,a3,a4,a5,a6,a7,a8);
544 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) {
545 return m_functor (a1,a2,a3,a4,a5,a6,a7,a8,a9);
555 FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
556 dynamic_cast<FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *
> (
PeekPointer (other));
557 if (otherDerived == 0)
575 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>
676 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
691 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) {
702 MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
703 dynamic_cast<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *
> (
PeekPointer (other));
704 if (otherDerived == 0)
724 template <
typename T,
typename R,
typename TX,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
732 template <
typename FUNCTOR,
typename ARG>
825 R
operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
836 BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *otherDerived =
837 dynamic_cast<BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *
> (
PeekPointer (other));
838 if (otherDerived == 0)
858 template <
typename T,
typename R,
typename TX1,
typename TX2,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
867 template <
typename FUNCTOR,
typename ARG1,
typename ARG2>
957 TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *otherDerived =
958 dynamic_cast<TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *
> (
PeekPointer (other));
959 if (otherDerived == 0)
980 template <
typename T,
typename R,
typename TX1,
typename TX2,
typename TX3,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
990 template <
typename FUNCTOR,
typename ARG1,
typename ARG2,
typename ARG3>
1067 ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *otherDerived =
1068 dynamic_cast<ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *
> (
PeekPointer (other));
1069 if (otherDerived == 0)
1158 template<
typename R,
1163 typename T9 =
empty>
1177 template <
typename FUNCTOR>
1179 :
CallbackBase (
Create<
FunctorCallbackImpl<FUNCTOR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (functor))
1188 template <
typename OBJ_PTR,
typename MEM_PTR>
1190 :
CallbackBase (
Create<
MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (objPtr, memPtr))
1208 template <
typename T>
1213 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1214 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a),
false);
1225 template <
typename TX1,
typename TX2>
1230 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1231 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a1, a2),
false);
1243 template <
typename TX1,
typename TX2,
typename TX3>
1248 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
1249 R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*
this, a1, a2, a3),
false);
1329 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6);
1341 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7)
const {
1342 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7);
1355 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
const {
1356 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8);
1370 R
operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9)
const {
1371 return (*(
DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8,a9);
1419 else if (other == 0)
1436 std::string othTid = other->GetTypeid ();
1438 NS_FATAL_ERROR_CONT (
"Incompatible types. (feed to \"c++filt -t\" if needed)" << std::endl <<
1439 "got=" << othTid << std::endl <<
1440 "expected=" << myTid);
1457 template <
typename R,
typename T1,
typename T2,
1458 typename T3,
typename T4,
1459 typename T5,
typename T6,
1460 typename T7,
typename T8,
1462 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)
1479 template <
typename T,
typename OBJ,
typename R>
1483 template <
typename T,
typename OBJ,
typename R>
1487 template <
typename T,
typename OBJ,
typename R,
typename T1>
1491 template <
typename T,
typename OBJ,
typename R,
typename T1>
1492 Callback<R,T1>
MakeCallback (R (T::*memPtr)(T1)
const, OBJ objPtr) {
1493 return Callback<R,T1> (objPtr, memPtr);
1495 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2>
1499 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2>
1500 Callback<R,T1,T2>
MakeCallback (R (T::*memPtr)(T1,T2)
const, OBJ objPtr) {
1501 return Callback<R,T1,T2> (objPtr, memPtr);
1503 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3>
1507 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3>
1508 Callback<R,T1,T2,T3>
MakeCallback (R (T::*memPtr)(T1,T2,T3)
const, OBJ objPtr) {
1509 return Callback<R,T1,T2,T3> (objPtr, memPtr);
1511 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1515 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1516 Callback<R,T1,T2,T3,T4>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4)
const, OBJ objPtr) {
1517 return Callback<R,T1,T2,T3,T4> (objPtr, memPtr);
1519 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1520 Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5), OBJ objPtr) {
1523 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1524 Callback<R,T1,T2,T3,T4,T5>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5)
const, OBJ objPtr) {
1525 return Callback<R,T1,T2,T3,T4,T5> (objPtr, memPtr);
1527 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1528 Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) {
1531 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1532 Callback<R,T1,T2,T3,T4,T5,T6>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6)
const, OBJ objPtr) {
1533 return Callback<R,T1,T2,T3,T4,T5,T6> (objPtr, memPtr);
1535 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1536 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) {
1539 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1540 Callback<R,T1,T2,T3,T4,T5,T6,T7>
MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7)
const, OBJ objPtr) {
1541 return Callback<R,T1,T2,T3,T4,T5,T6,T7> (objPtr, memPtr);
1543 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1544 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) {
1547 template <
typename T,
typename OBJ,
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1548 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) {
1549 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (objPtr, memPtr);
1551 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>
1552 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) {
1553 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, memPtr);
1555 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>
1556 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) {
1557 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, memPtr);
1572 template <
typename R>
1576 template <
typename R,
typename T1>
1580 template <
typename R,
typename T1,
typename T2>
1584 template <
typename R,
typename T1,
typename T2,
typename T3>
1588 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1592 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1596 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1597 Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6)) {
1600 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1601 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7)) {
1604 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1605 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8)) {
1606 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (fnPtr,
true,
true);
1608 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
1609 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9)) {
1610 return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (fnPtr,
true,
true);
1625 template <
typename R>
1629 template <
typename R,
typename T1>
1633 template <
typename R,
typename T1,
typename T2>
1637 template <
typename R,
typename T1,
typename T2,
typename T3>
1641 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4>
1645 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1649 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1653 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1657 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1661 template <
typename R,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
1676 template <
typename R,
typename TX,
typename ARG>
1679 Create<BoundFunctorCallbackImpl<R (*)(TX),R,TX,empty,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a1);
1682 template <
typename R,
typename TX,
typename ARG,
1686 Create<BoundFunctorCallbackImpl<R (*)(TX,T1),R,TX,T1,empty,empty,empty,empty,empty,empty,empty> > (fnPtr, a1);
1689 template <
typename R,
typename TX,
typename ARG,
1690 typename T1,
typename T2>
1693 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2),R,TX,T1,T2,empty,empty,empty,empty,empty,empty> > (fnPtr, a1);
1696 template <
typename R,
typename TX,
typename ARG,
1697 typename T1,
typename T2,
typename T3>
1700 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3),R,TX,T1,T2,T3,empty,empty,empty,empty,empty> > (fnPtr, a1);
1703 template <
typename R,
typename TX,
typename ARG,
1704 typename T1,
typename T2,
typename T3,
typename T4>
1707 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4),R,TX,T1,T2,T3,T4,empty,empty,empty,empty> > (fnPtr, a1);
1710 template <
typename R,
typename TX,
typename ARG,
1711 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1712 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a1) {
1714 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5),R,TX,T1,T2,T3,T4,T5,empty,empty,empty> > (fnPtr, a1);
1717 template <
typename R,
typename TX,
typename ARG,
1718 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1719 Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a1) {
1721 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6),R,TX,T1,T2,T3,T4,T5,T6,empty,empty> > (fnPtr, a1);
1724 template <
typename R,
typename TX,
typename ARG,
1725 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1726 Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a1) {
1728 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7),R,TX,T1,T2,T3,T4,T5,T6,T7,empty> > (fnPtr, a1);
1731 template <
typename R,
typename TX,
typename ARG,
1732 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
1733 Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a1) {
1735 Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7,T8),R,TX,T1,T2,T3,T4,T5,T6,T7,T8> > (fnPtr, a1);
1749 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2>
1752 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2),R,TX1,TX2,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a1, a2);
1755 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1759 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1),R,TX1,TX2,T1,empty,empty,empty,empty,empty,empty> > (fnPtr, a1, a2);
1762 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1763 typename T1,
typename T2>
1766 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2),R,TX1,TX2,T1,T2,empty,empty,empty,empty,empty> > (fnPtr, a1, a2);
1769 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1770 typename T1,
typename T2,
typename T3>
1773 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3),R,TX1,TX2,T1,T2,T3,empty,empty,empty,empty> > (fnPtr, a1, a2);
1776 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1777 typename T1,
typename T2,
typename T3,
typename T4>
1778 Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4), ARG1 a1, ARG2 a2) {
1780 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4),R,TX1,TX2,T1,T2,T3,T4,empty,empty,empty> > (fnPtr, a1, a2);
1783 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1784 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1785 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2) {
1787 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5),R,TX1,TX2,T1,T2,T3,T4,T5,empty,empty> > (fnPtr, a1, a2);
1790 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1791 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1792 Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2) {
1794 Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5,T6),R,TX1,TX2,T1,T2,T3,T4,T5,T6,empty> > (fnPtr, a1, a2);
1797 template <
typename R,
typename TX1,
typename TX2,
typename ARG1,
typename ARG2,
1798 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
1799 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) {
1801 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);
1816 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3>
1819 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3),R,TX1,TX2,TX3,empty,empty,empty,empty,empty,empty> >(fnPtr, a1, a2, a3);
1822 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1826 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1),R,TX1,TX2,TX3,T1,empty,empty,empty,empty,empty> > (fnPtr, a1, a2, a3);
1829 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1830 typename T1,
typename T2>
1833 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2),R,TX1,TX2,TX3,T1,T2,empty,empty,empty,empty> > (fnPtr, a1, a2, a3);
1836 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1837 typename T1,
typename T2,
typename T3>
1838 Callback<R,T1,T2,T3> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3), ARG1 a1, ARG2 a2, ARG3 a3) {
1840 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3),R,TX1,TX2,TX3,T1,T2,T3,empty,empty,empty> > (fnPtr, a1, a2, a3);
1843 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1844 typename T1,
typename T2,
typename T3,
typename T4>
1845 Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4), ARG1 a1, ARG2 a2, ARG3 a3) {
1847 Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4),R,TX1,TX2,TX3,T1,T2,T3,T4,empty,empty> > (fnPtr, a1, a2, a3);
1850 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1851 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1852 Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2, ARG3 a3) {
1854 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);
1857 template <
typename R,
typename TX1,
typename TX2,
typename TX3,
typename ARG1,
typename ARG2,
typename ARG3,
1858 typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1859 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) {
1861 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);
1891 template <
typename T>
1920 template <
typename T>
1923 if (value.CheckType (
m_value))
NS_FATAL_x macro definitions.
static std::string DoGetTypeid(void)
virtual std::string GetTypeid(void) const
Get the type as a string.
virtual std::string GetTypeid(void) const
Get the type as a string.
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()
Smart pointer 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)
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 type as a string.
virtual ~CallbackValue()
Destructor.
bool Assign(const CallbackBase &other)
Adopt the other's implementation, if type compatible.
virtual std::string GetTypeid(void) const
Get the type as a string.
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 type as a string.
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 Checker and the MakeTypeChecker function for class type...
virtual std::string GetTypeid(void) const =0
Get the type as a string.
static std::string DoGetTypeid(void)
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)
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)
virtual std::string GetTypeid(void) const
Get the type as a string.
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 type as a string.
R operator()(void) const
Functor with varying numbers of arguments.
virtual std::string GetTypeid(void) const
Get the type as a string.
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)
#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)
TypeTraits< TX1 >::ReferencedType m_a1
first bound argument
static std::string DoGetTypeid(void)
virtual std::string GetTypeid(void) const
Get the type as a string.
Callback(OBJ_PTR const &objPtr, MEM_PTR memPtr)
Construct a member function pointer call back.
virtual ~ThreeBoundFunctorCallbackImpl()
Declaration of Attribute helper macros.
static std::string DoGetTypeid(void)
static std::string DoGetTypeid(void)
#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
virtual std::string GetTypeid(void) const
Get the type as a string.
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.
Inspect a type to deduce its features.
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.
Definition of class ns3::empty, 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)
Reference counting for smart pointers.
TypeTraits< TX2 >::ReferencedType m_a2
second bound argument
Ptr< CallbackImplBase > GetImpl(void) const
TypeTraits introspection template.
ThreeBoundFunctorCallbackImpl(FUNCTOR functor, ARG1 arg1, ARG2 arg2, ARG3 arg3)
Construct from functor and three arguments.
R operator()(void)
Functor with varying numbers of arguments.