src/core/model/traced-callback.h
author Peter D. Barnes, Jr. <barnes26@llnl.gov>
Wed, 05 Mar 2014 17:06:59 -0800
changeset 10652 dc18deba4502
parent 7386 2310ed220a61
child 11085 6e4d08656d7c
permissions -rw-r--r--
[doxygen] Revert r10410, r10411, r10412
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     2
/*
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     3
 * Copyright (c) 2005,2006,2007 INRIA
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     4
 *
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     8
 *
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    12
 * GNU General Public License for more details.
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    13
 *
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    17
 *
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    19
 */
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    20
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2466
diff changeset
    21
#ifndef TRACED_CALLBACK_H
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2466
diff changeset
    22
#define TRACED_CALLBACK_H
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    23
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    24
#include <list>
1335
d0e45d84f9c6 fix includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1334
diff changeset
    25
#include "callback.h"
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    26
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    27
namespace ns3 {
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    28
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    29
/**
2779
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    30
 * \brief forward calls to a chain of Callback
1389
93f575998efc s/lowleveltracing/tracing/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1361
diff changeset
    31
 * \ingroup tracing
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    32
 *
2779
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    33
 * An ns3::TracedCallback has almost exactly the same API as a normal ns3::Callback but
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    34
 * instead of forwarding calls to a single function (as an ns3::Callback normally does),
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    35
 * it forwards calls to a chain of ns3::Callback. TracedCallback::Connect adds a ns3::Callback
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    36
 * at the end of the chain of callbacks. TracedCallback::Disconnect removes a ns3::Callback from
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    37
 * the chain of callbacks.
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    38
 */
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    39
template<typename T1 = empty, typename T2 = empty, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    40
         typename T3 = empty, typename T4 = empty,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    41
         typename T5 = empty, typename T6 = empty,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    42
         typename T7 = empty, typename T8 = empty>
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2466
diff changeset
    43
class TracedCallback 
2462
93028d4474ba add an IntegerTraceSource which behaves just like an Integer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1419
diff changeset
    44
{
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    45
public:
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2466
diff changeset
    46
  TracedCallback ();
2779
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    47
  /**
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    48
   * \param callback callback to add to chain of callbacks
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    49
   *
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    50
   * Append the input callback to the end of the internal list 
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    51
   * of ns3::Callback.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    52
   */
2594
a8f89acd17a1 Config::Connect -> Config::ConnectWithoutContext && Config::ConnectWithContext -> Config::Connect
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2569
diff changeset
    53
  void ConnectWithoutContext (const CallbackBase & callback);
2779
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    54
  /**
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    55
   * \param callback callback to add to chain of callbacks
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    56
   * \param path the path to send back to the user callback.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    57
   *
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    58
   * Append the input callback to the end of the internal list 
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    59
   * of ns3::Callback. This method also will make sure that the
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    60
   * input path specified by the user will be give back to the
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    61
   * user's callback as its first argument. 
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    62
   */
2594
a8f89acd17a1 Config::Connect -> Config::ConnectWithoutContext && Config::ConnectWithContext -> Config::Connect
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2569
diff changeset
    63
  void Connect (const CallbackBase & callback, std::string path);
2779
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    64
  /**
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    65
   * \param callback callback to remove from the chain of callbacks.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    66
   *
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    67
   * Remove the input callback from the internal list 
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    68
   * of ns3::Callback. This method is really the symmetric
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    69
   * of the TracedCallback::ConnectWithoutContext method.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    70
   */
2594
a8f89acd17a1 Config::Connect -> Config::ConnectWithoutContext && Config::ConnectWithContext -> Config::Connect
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2569
diff changeset
    71
  void DisconnectWithoutContext (const CallbackBase & callback);
2779
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    72
  /**
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    73
   * \param callback callback to remove from the chain of callbacks.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    74
   * \param path the path which is sent back to the user callback.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    75
   *
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    76
   * Remove the input callback which has a matching path as first argument 
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    77
   * from the internal list of ns3::Callback. This method is really the symmetric
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    78
   * of the TracedCallback::Connect method.
23d3da8fbb79 improve doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2594
diff changeset
    79
   */
2594
a8f89acd17a1 Config::Connect -> Config::ConnectWithoutContext && Config::ConnectWithContext -> Config::Connect
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2569
diff changeset
    80
  void Disconnect (const CallbackBase & callback, std::string path);
1343
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
    81
  void operator() (void) const;
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
    82
  void operator() (T1 a1) const;
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
    83
  void operator() (T1 a1, T2 a2) const;
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
    84
  void operator() (T1 a1, T2 a2, T3 a3) const;
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
    85
  void operator() (T1 a1, T2 a2, T3 a3, T4 a4) const;
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    86
  void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) const;
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    87
  void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) const;
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    88
  void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const;
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    89
  void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const;
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    90
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
    91
private:
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
    92
  typedef std::list<Callback<void,T1,T2,T3,T4,T5,T6,T7,T8> > CallbackList;
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    93
  CallbackList m_callbackList;
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    94
};
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    95
2462
93028d4474ba add an IntegerTraceSource which behaves just like an Integer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1419
diff changeset
    96
} // namespace ns3
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    97
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    98
// implementation below.
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    99
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   100
namespace ns3 {
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   101
1419
ac2a81821ab5 add support for NodeList::ConnectPrinterToAll
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1389
diff changeset
   102
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   103
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   104
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   105
         typename T7, typename T8>
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   106
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::TracedCallback ()
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   107
  : m_callbackList () 
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   108
{
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   109
}
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   110
template<typename T1, typename T2,
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   111
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   112
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   113
         typename T7, typename T8>
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   114
void
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   115
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::ConnectWithoutContext (const CallbackBase & callback)
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   116
{
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   117
  Callback<void,T1,T2,T3,T4,T5,T6,T7,T8> cb;
529
cbd7b6a6ca24 use Callback::Assign
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 393
diff changeset
   118
  cb.Assign (callback);
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   119
  m_callbackList.push_back (cb);
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   120
}
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   121
template<typename T1, typename T2,
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   122
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   123
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   124
         typename T7, typename T8>
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   125
void
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   126
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::Connect (const CallbackBase & callback, std::string path)
2531
b451b5fc8b57 implement context-based trace connection
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   127
{
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   128
  Callback<void,std::string,T1,T2,T3,T4,T5,T6,T7,T8> cb;
2531
b451b5fc8b57 implement context-based trace connection
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   129
  cb.Assign (callback);
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   130
  Callback<void,T1,T2,T3,T4,T5,T6,T7,T8> realCb = cb.Bind (path);
2531
b451b5fc8b57 implement context-based trace connection
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   131
  m_callbackList.push_back (realCb);
b451b5fc8b57 implement context-based trace connection
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   132
}
b451b5fc8b57 implement context-based trace connection
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   133
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   134
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   135
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   136
         typename T7, typename T8>
2531
b451b5fc8b57 implement context-based trace connection
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   137
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   138
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::DisconnectWithoutContext (const CallbackBase & callback)
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   139
{
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   140
  for (typename CallbackList::iterator i = m_callbackList.begin ();
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   141
       i != m_callbackList.end (); /* empty */)
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   142
    {
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   143
      if ((*i).IsEqual (callback))
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   144
        {
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   145
          i = m_callbackList.erase (i);
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   146
        }
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   147
      else
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   148
        {
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   149
          i++;
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   150
        }
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   151
    }
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   152
}
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   153
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   154
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   155
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   156
         typename T7, typename T8>
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   157
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   158
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::Disconnect (const CallbackBase & callback, std::string path)
2569
d5cff2968984 make Disconnect work with trace contexts.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2531
diff changeset
   159
{
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   160
  Callback<void,std::string,T1,T2,T3,T4,T5,T6,T7,T8> cb;
2569
d5cff2968984 make Disconnect work with trace contexts.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2531
diff changeset
   161
  cb.Assign (callback);
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   162
  Callback<void,T1,T2,T3,T4,T5,T6,T7,T8> realCb = cb.Bind (path);
2594
a8f89acd17a1 Config::Connect -> Config::ConnectWithoutContext && Config::ConnectWithContext -> Config::Connect
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2569
diff changeset
   163
  DisconnectWithoutContext (realCb);
2569
d5cff2968984 make Disconnect work with trace contexts.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2531
diff changeset
   164
}
d5cff2968984 make Disconnect work with trace contexts.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2531
diff changeset
   165
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   166
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   167
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   168
         typename T7, typename T8>
2569
d5cff2968984 make Disconnect work with trace contexts.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2531
diff changeset
   169
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   170
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (void) const
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   171
{
1343
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
   172
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   173
       i != m_callbackList.end (); i++)
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   174
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   175
      (*i)();
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   176
    }
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   177
}
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   178
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   179
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   180
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   181
         typename T7, typename T8>
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   182
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   183
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1) const
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   184
{
1343
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
   185
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   186
       i != m_callbackList.end (); i++)
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   187
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   188
      (*i)(a1);
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   189
    }
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   190
}
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   191
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   192
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   193
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   194
         typename T7, typename T8>
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   195
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   196
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2) const
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   197
{
1343
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
   198
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   199
       i != m_callbackList.end (); i++)
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   200
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   201
      (*i)(a1, a2);
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   202
    }
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   203
}
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   204
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   205
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   206
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   207
         typename T7, typename T8>
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   208
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   209
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2, T3 a3) const
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   210
{
1343
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
   211
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   212
       i != m_callbackList.end (); i++)
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   213
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   214
      (*i)(a1, a2, a3);
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   215
    }
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   216
}
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   217
template<typename T1, typename T2, 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   218
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   219
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   220
         typename T7, typename T8>
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   221
void 
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   222
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2, T3 a3, T4 a4) const
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   223
{
1343
421d8d4712f9 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1335
diff changeset
   224
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   225
       i != m_callbackList.end (); i++)
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   226
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   227
      (*i)(a1, a2, a3, a4);
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   228
    }
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   229
}
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   230
template<typename T1, typename T2, 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   231
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   232
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   233
         typename T7, typename T8>
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   234
void 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   235
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) const
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   236
{
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   237
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   238
       i != m_callbackList.end (); i++)
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   239
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   240
      (*i)(a1, a2, a3, a4, a5);
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   241
    }
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   242
}
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   243
template<typename T1, typename T2, 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   244
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   245
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   246
         typename T7, typename T8>
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   247
void 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   248
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) const
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   249
{
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   250
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   251
       i != m_callbackList.end (); i++)
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   252
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   253
      (*i)(a1, a2, a3, a4, a5, a6);
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   254
    }
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   255
}
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   256
template<typename T1, typename T2, 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   257
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   258
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   259
         typename T7, typename T8>
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   260
void 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   261
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   262
{
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   263
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   264
       i != m_callbackList.end (); i++)
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   265
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   266
      (*i)(a1, a2, a3, a4, a5, a6, a7);
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   267
    }
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   268
}
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   269
template<typename T1, typename T2, 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   270
         typename T3, typename T4,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   271
         typename T5, typename T6,
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   272
         typename T7, typename T8>
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   273
void 
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   274
TracedCallback<T1,T2,T3,T4,T5,T6,T7,T8>::operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   275
{
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   276
  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   277
       i != m_callbackList.end (); i++)
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   278
    {
7169
358f71a624d8 core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6821
diff changeset
   279
      (*i)(a1, a2, a3, a4, a5, a6, a7, a8);
4072
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   280
    }
5d226c752e85 bug 412: support more arguments in callbacks.
Providence.Salumu <Providence.Salumu@gmail.com>
parents: 2834
diff changeset
   281
}
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   282
7386
2310ed220a61 standardize ns-3 namespace declaration format
Vedran Miletić <rivanvx@gmail.com>
parents: 7169
diff changeset
   283
} // namespace ns3
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   284
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2466
diff changeset
   285
#endif /* TRACED_CALLBACK_H */