scc 2025.09
SystemC components library
scc::ScLogger< SEVERITY > Struct Template Reference

the logger class More...

#include <report.h>

Public Member Functions

 ScLogger (const char *file, int line, int verbosity=sc_core::SC_MEDIUM)
 ScLogger (const ScLogger &)=delete
 ScLogger (ScLogger &&)=delete
ScLoggeroperator= (const ScLogger &)=delete
ScLoggeroperator= (ScLogger &&)=delete
virtual ~ScLogger () noexcept(false)
 the destructor generating the SystemC report
ScLoggertype ()
 reset the category of the log entry
ScLoggertype (char const *t)
 set the category of the log entry
ScLoggertype (std::string const &t)
 set the category of the log entry
std::ostream & get ()
 get the underlying ostringstream

Protected Attributes

std::ostringstream os {}
char * t {nullptr}
const char * file
const int line
const int level

Detailed Description

template<sc_core::sc_severity SEVERITY>
struct scc::ScLogger< SEVERITY >

the logger class

The ScLogger creates a RTTI based output stream to be used similar to std::cout

Template Parameters
SEVERITY

Definition at line 357 of file report.h.

Constructor & Destructor Documentation

◆ ScLogger()

template<sc_core::sc_severity SEVERITY>
scc::ScLogger< SEVERITY >::ScLogger ( const char * file,
int line,
int verbosity = sc_core::SC_MEDIUM )
inline
Parameters
filewhere the log entry originates
linenumber where the log entry originates
verbositythe log level

Definition at line 366 of file report.h.

◆ ~ScLogger()

template<sc_core::sc_severity SEVERITY>
virtual scc::ScLogger< SEVERITY >::~ScLogger ( )
inlinevirtual

the destructor generating the SystemC report

Definition at line 386 of file report.h.

Member Function Documentation

◆ get()

template<sc_core::sc_severity SEVERITY>
std::ostream & scc::ScLogger< SEVERITY >::get ( )
inline

get the underlying ostringstream

Returns
the output stream collecting the log message

Definition at line 430 of file report.h.

◆ type() [1/3]

template<sc_core::sc_severity SEVERITY>
ScLogger & scc::ScLogger< SEVERITY >::type ( )
inline

reset the category of the log entry

Returns
reference to self for chaining

Definition at line 398 of file report.h.

◆ type() [2/3]

template<sc_core::sc_severity SEVERITY>
ScLogger & scc::ScLogger< SEVERITY >::type ( char const * t)
inline

set the category of the log entry

Parameters
ttype of th elog entry
Returns
reference to self for chaining

Definition at line 409 of file report.h.

◆ type() [3/3]

template<sc_core::sc_severity SEVERITY>
ScLogger & scc::ScLogger< SEVERITY >::type ( std::string const & t)
inline

set the category of the log entry

Parameters
ttype of th elog entry
Returns
reference to self for chaining

Definition at line 420 of file report.h.

Member Data Documentation

◆ file

template<sc_core::sc_severity SEVERITY>
const char* scc::ScLogger< SEVERITY >::file
protected

Definition at line 435 of file report.h.

◆ level

template<sc_core::sc_severity SEVERITY>
const int scc::ScLogger< SEVERITY >::level
protected

Definition at line 437 of file report.h.

◆ line

template<sc_core::sc_severity SEVERITY>
const int scc::ScLogger< SEVERITY >::line
protected

Definition at line 436 of file report.h.

◆ os

template<sc_core::sc_severity SEVERITY>
std::ostringstream scc::ScLogger< SEVERITY >::os {}
protected

Definition at line 433 of file report.h.

◆ t

template<sc_core::sc_severity SEVERITY>
char* scc::ScLogger< SEVERITY >::t {nullptr}
protected

Definition at line 434 of file report.h.


The documentation for this struct was generated from the following file:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/sysc/scc/report.h