A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
time-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 TIME_PRINTER_H
9#define TIME_PRINTER_H
10
11#include <ostream>
12
13/**
14 * @file
15 * @ingroup time
16 * Declaration of ns3::TimePrinter function pointer type
17 * and ns3::DefaultTimePrinter function.
18 */
19
20namespace ns3
21{
22
23/**
24 * Function signature for features requiring a time formatter,
25 * such as logging or ShowProgress.
26 *
27 * A TimePrinter should write the current simulation time
28 * (Simulator::Now()) on the designated output stream.
29 *
30 * @param [in,out] os The output stream to print on.
31 */
32typedef void (*TimePrinter)(std::ostream& os);
33
34/**
35 * Default Time printer.
36 *
37 * @param [in,out] os The output stream to print on.
38 */
39void DefaultTimePrinter(std::ostream& os);
40
41} // namespace ns3
42
43#endif /* TIME_H */
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void(* TimePrinter)(std::ostream &os)
Function signature for features requiring a time formatter, such as logging or ShowProgress.
void DefaultTimePrinter(std::ostream &os)
Default Time printer.