UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
col Class Reference

#include <color_out.h>

Collaboration diagram for col:
Collaboration graph

Public Member Functions

 ~col ()
 
template<class T >
col & operator<< (const T &val)
 

Private Attributes

std::ostringstream oss
 

Detailed Description

Class wrapping color output to terminal. Sample usage:

col() << SBOLD("Red message: ") << "normal font.\n"

TERM_* or T<PROP>() macros can be used as well.

Definition at line 116 of file color_out.h.

Constructor & Destructor Documentation

◆ ~col()

col::~col ( )
inline

Definition at line 125 of file color_out.h.

125 {
126 color_printf("%s", oss.str().c_str());
127 }
std::ostringstream oss
Definition color_out.h:129
int color_printf(const char *format,...) __attribute__((format(printf

References color_printf(), and oss.

Here is the call graph for this function:

Member Function Documentation

◆ operator<<()

template<class T >
col & col::operator<< ( const T & val)
inline

Definition at line 120 of file color_out.h.

120 {
121 oss << val;
122 return *this;
123 }
int void * val

References oss, and val.

Member Data Documentation

◆ oss

std::ostringstream col::oss
private

Definition at line 129 of file color_out.h.

Referenced by ~col(), and operator<<().


The documentation for this class was generated from the following file: