A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
traced-callback-typedef-test.h File Reference

Scaffolding shared by the per-module TracedCallback typedef test suites. More...

#include "ns3/test.h"
#include "ns3/traced-callback.h"
#include <cstddef>
#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
Include dependency graph for traced-callback-typedef-test.h:

Go to the source code of this file.

Classes

class  ns3::TracedCallbackTypedefTestCase::Checker< Ts >
 Callback checkers. More...
class  ns3::TracedCallbackTypedefTestCase
 Base class for the per-module TracedCallback typedef test cases. More...
class  ns3::TracedCbSink< Ts >
 Sink functions. More...

Namespaces

namespace  ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.

Macros

#define TRACED_CALLBACK_CHECK(U, ...)
 Check the TracedCallback by calling its Invoke function.
#define TRACED_CALLBACK_DUPE(U, T1)
 Check the TracedCallback duplicate by checking if it matches the TracedCallback it is supposed to be equal to.
#define TRACED_CALLBACK_TYPENAME(T)
 Declare the stringified name of a TracedCallback typedef.

Functions

template<typename T>
std::string ns3::TracedCallbackTypeName (int N)
 Stringify the known TracedCallback type names.

Variables

std::size_t ns3::g_nArgs = 0
 Number of arguments the last invoked TracedCallback passed to its sink.

Detailed Description

Scaffolding shared by the per-module TracedCallback typedef test suites.

Each module declaring TracedCallback typedefs owns a test suite deriving from TracedCallbackTypedefTestCase, which uses the TRACED_CALLBACK_CHECK() and TRACED_CALLBACK_DUPE() macros to verify that its typedefs are invoked with the right type and number of arguments.

Definition in file traced-callback-typedef-test.h.