Workspace 6.21.5
Public Types | Public Member Functions | Public Attributes | List of all members
LoggingThread Class Reference

Thread for modifying the log - writing to it, adding streams etc.

#include <Workspace/Application/logmanagerimplthreaded.h>

Inherits QThread.

Public Types

using LogUpdateFunc = std::function< bool()>
 
using LogUpdateFuncAndResult = std::pair< std::function< bool()>, std::unique_ptr< std::promise< bool > > >
 

Public Member Functions

 LoggingThread ()=default
 
 LoggingThread (const LoggingThread &other)=delete
 
 ~LoggingThread () override=default
 
bool enqueue (LogUpdateFunc func, std::unique_ptr< std::promise< bool > > resultPromise={})
 
bool isStopped () const
 
LoggingThreadoperator= (const LoggingThread &other)=delete
 
void requestStop ()
 
void run () override
 

Public Attributes

QSemaphore hasMessage
 

Member Typedef Documentation

◆ LogUpdateFunc

using LogUpdateFunc = std::function<bool()>

◆ LogUpdateFuncAndResult

using LogUpdateFuncAndResult = std::pair<std::function<bool()>, std::unique_ptr<std::promise<bool> >>

Constructor & Destructor Documentation

◆ LoggingThread() [1/2]

LoggingThread ( )
default

◆ LoggingThread() [2/2]

LoggingThread ( const LoggingThread other)
delete

◆ ~LoggingThread()

~LoggingThread ( )
overridedefault

Member Function Documentation

◆ enqueue()

bool enqueue ( LogUpdateFunc  func,
std::unique_ptr< std::promise< bool > >  resultPromise = {} 
)

◆ isStopped()

bool isStopped ( ) const

◆ operator=()

LoggingThread & operator= ( const LoggingThread other)
delete

◆ requestStop()

void requestStop ( )

◆ run()

void run ( )
override

Member Data Documentation

◆ hasMessage

QSemaphore hasMessage