Files
unison/src/core/model/node-printer.cc

41 lines
629 B
C++
Raw Normal View History

/*
* Copyright (c) 2018 Lawrence Livermore National Laboratory
*
2024-06-17 16:17:10 +02:00
* SPDX-License-Identifier: GPL-2.0-only
*
* Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
*/
#include "node-printer.h"
2022-10-07 20:08:35 +00:00
#include "log.h"
#include "simulator.h" // GetContext()
#include <iomanip>
/**
2024-11-08 18:05:46 +00:00
* @file
* @ingroup simulator
* ns3::DefaultNodePrinter implementation.
*/
2022-10-07 20:08:35 +00:00
namespace ns3
{
2022-10-07 20:08:35 +00:00
NS_LOG_COMPONENT_DEFINE("NodePrinter");
void
2022-10-07 20:08:35 +00:00
DefaultNodePrinter(std::ostream& os)
{
2022-10-07 20:08:35 +00:00
if (Simulator::GetContext() == Simulator::NO_CONTEXT)
{
2022-10-07 20:08:35 +00:00
os << "-1";
}
2022-10-07 20:08:35 +00:00
else
{
2022-10-07 20:08:35 +00:00
os << Simulator::GetContext();
}
}
} // namespace ns3