A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
node-printer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Lawrence Livermore National Laboratory
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
7 */
8#ifndef NODE_PRINTER_H
9#define NODE_PRINTER_H
10
11#include <ostream>
12
13/**
14 * \file
15 * \ingroup logging
16 * Declaration of ns3::NodePrinter function pointer type
17 * and ns3::DefaultNodePrinter function.
18 */
19
20namespace ns3
21{
22
23/**
24 * Function signature for prepending the node id
25 * to a log message.
26 *
27 * \param [in,out] os The output stream to print on.
28 */
29typedef void (*NodePrinter)(std::ostream& os);
30
31/**
32 * \ingroup logging
33 * Default node id printer implementation.
34 *
35 * \param [in,out] os The output stream to print the node id on.
36 */
37void DefaultNodePrinter(std::ostream& os);
38
39} // namespace ns3
40
41#endif /* NODE_H */
void DefaultNodePrinter(std::ostream &os)
Default node id printer implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void(* NodePrinter)(std::ostream &os)
Function signature for prepending the node id to a log message.