Insert ,
when streaming function arguments.
More...
#include "log.h"
Public Member Functions | |
ParameterLogger (std::ostream &os) | |
Constructor. More... | |
template<typename T > | |
ParameterLogger & | operator<< (const std::vector< T > &vector) |
Overload for vectors, to print each element. More... | |
template<typename T > | |
ParameterLogger & | operator<< (const T ¶m) |
Write a function parameter on the output stream, separating parameters after the first by , strings. More... | |
Private Member Functions | |
void | CommaRest () |
Add , before every parameter after the first. More... | |
Private Attributes | |
bool | m_first {true} |
First argument flag, doesn't get , . More... | |
std::ostream & | m_os |
Underlying output stream. More... | |
ns3::ParameterLogger::ParameterLogger | ( | std::ostream & | os | ) |
|
private |
Add ,
before every parameter after the first.
Definition at line 526 of file log.cc.
Referenced by operator<<().
ParameterLogger & ns3::ParameterLogger::operator<< | ( | const std::vector< T > & | vector | ) |
Overload for vectors, to print each element.
[in] | vector | The vector of parameters |
ParameterLogger & ns3::ParameterLogger::operator<< | ( | const T & | param | ) |
Write a function parameter on the output stream, separating parameters after the first by ,
strings.
[in] | param | The function parameter. |
Definition at line 475 of file log.h.
References CommaRest(), and m_os.
|
private |
First argument flag, doesn't get ,
.
Definition at line 470 of file log.h.
Referenced by CommaRest().
|
private |
Underlying output stream.
Definition at line 471 of file log.h.
Referenced by CommaRest(), and operator<<().