21 #ifndef TRACED_CALLBACK_H
22 #define TRACED_CALLBACK_H
51 template<
typename... Ts>
124 template<
typename... Ts>
128 template<
typename... Ts>
133 if (!cb.Assign (callback))
137 m_callbackList.push_back (cb);
139 template<
typename... Ts>
143 Callback<void,std::string,Ts...> cb;
144 if (!cb.Assign (callback))
149 m_callbackList.push_back (realCb);
151 template<
typename... Ts>
155 for (
typename CallbackList::iterator i = m_callbackList.begin ();
156 i != m_callbackList.end (); )
158 if ((*i).IsEqual (callback))
160 i = m_callbackList.erase (i);
168 template<
typename... Ts>
172 Callback<void,std::string,Ts...> cb;
173 if (!cb.Assign (callback))
180 template<
typename... Ts>
184 for (
typename CallbackList::const_iterator i = m_callbackList.begin ();
185 i != m_callbackList.end (); i++)
Declaration of the various callback functions.
Base class for Callback class.
Callback< R, T2, T3, T4, T5, T6, T7, T8, T9 > Bind(T a)
Bind the first arguments.
Forward calls to a chain of Callback.
CallbackList m_callbackList
The chain of Callbacks.
void(* Uint32Callback)(const uint32_t value)
TracedCallback signature for POD.
void Disconnect(const CallbackBase &callback, std::string path)
Remove from the chain a Callback which was connected with a context.
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
TracedCallback()
Constructor.
void operator()(Ts... args) const
Functor which invokes the chain of Callbacks.
void DisconnectWithoutContext(const CallbackBase &callback)
Remove from the chain a Callback which was connected without a context.
std::list< Callback< void, Ts... > > CallbackList
Container type for holding the chain of Callbacks.
void Connect(const CallbackBase &callback, std::string path)
Append a Callback to the chain with a context.
void DisconnectWithoutContext(std::string path, const CallbackBase &cb)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_FATAL_ERROR_NO_MSG()
Report a fatal error and terminate.
Every class exported by the ns3 library is enclosed in the ns3 namespace.