Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink Class Referencefinal
Inheritance diagram for bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink:
[legend]
Collaboration diagram for bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink:
[legend]

Public Member Functions

 ConsoleSink ()
 ~ConsoleSink () override
void Write (const LogRecord &record) override
void Flush () override
Public Member Functions inherited from bicameral::LogSink
virtual ~LogSink ()=default

Private Attributes

HANDLE m_output = nullptr
DWORD m_previousMode = 0
UINT m_previousCodePage = 0
bool m_useColor = false

Detailed Description

Definition at line 42 of file log_sinks.cpp.

Constructor & Destructor Documentation

◆ ConsoleSink()

bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::ConsoleSink ( )
inline

Definition at line 44 of file log_sinks.cpp.

References m_output, m_previousCodePage, m_previousMode, and m_useColor.

◆ ~ConsoleSink()

bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::~ConsoleSink ( )
inlineoverride

Definition at line 58 of file log_sinks.cpp.

References m_output, m_previousCodePage, m_previousMode, and m_useColor.

Member Function Documentation

◆ Flush()

void bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::Flush ( )
inlineoverridevirtual

Reimplemented from bicameral::LogSink.

Definition at line 79 of file log_sinks.cpp.

◆ Write()

void bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::Write ( const LogRecord & record)
inlineoverridevirtual

Implements bicameral::LogSink.

Definition at line 67 of file log_sinks.cpp.

References bicameral::anonymous_namespace{log_sinks.cpp}::ColorOf(), bicameral::FormatLogLine(), bicameral::LogRecord::level, m_useColor, and bicameral::Warning.

Here is the call graph for this function:

Member Data Documentation

◆ m_output

HANDLE bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::m_output = nullptr
private

Definition at line 82 of file log_sinks.cpp.

Referenced by ConsoleSink(), and ~ConsoleSink().

◆ m_previousCodePage

UINT bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::m_previousCodePage = 0
private

Definition at line 84 of file log_sinks.cpp.

Referenced by ConsoleSink(), and ~ConsoleSink().

◆ m_previousMode

DWORD bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::m_previousMode = 0
private

Definition at line 83 of file log_sinks.cpp.

Referenced by ConsoleSink(), and ~ConsoleSink().

◆ m_useColor

bool bicameral::anonymous_namespace{log_sinks.cpp}::ConsoleSink::m_useColor = false
private

Definition at line 85 of file log_sinks.cpp.

Referenced by ConsoleSink(), Write(), and ~ConsoleSink().


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