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