3D Forest
Software for analysis of Lidar data from forest environment.
LogThread Class Reference

#include <Log.hpp>

Public Member Functions

 LogThread ()
 
 ~LogThread ()
 
void setCallback (LogThreadCallbackInterface *callback)
 
void println (LogType type, const char *module, const char *function, const std::string &text)
 
void stop ()
 

Private Member Functions

void run ()
 

Private Attributes

std::vector< LogMessagemessageQueue_
 
size_t messageQueueHead_
 
size_t messageQueueTail_
 
std::shared_ptr< std::thread > thread_
 
std::mutex mutex_
 
std::condition_variable condition_
 
std::mutex mutexCaller_
 
std::condition_variable conditionCaller_
 
LogThreadCallbackInterfacecallback_
 
bool running_
 
bool received_
 

Constructor & Destructor Documentation

◆ LogThread()

LogThread::LogThread ( )

◆ ~LogThread()

LogThread::~LogThread ( )

Member Function Documentation

◆ println()

void LogThread::println ( LogType type,
const char * module,
const char * function,
const std::string & text )

◆ run()

void LogThread::run ( )
private

Referenced by LogThread().

◆ setCallback()

void LogThread::setCallback ( LogThreadCallbackInterface * callback)

◆ stop()

void LogThread::stop ( )

Member Data Documentation

◆ callback_

LogThreadCallbackInterface* LogThread::callback_
private

Referenced by run(), and setCallback().

◆ condition_

std::condition_variable LogThread::condition_
private

Referenced by println(), run(), setCallback(), and stop().

◆ conditionCaller_

std::condition_variable LogThread::conditionCaller_
private

Referenced by run(), and stop().

◆ messageQueue_

std::vector<LogMessage> LogThread::messageQueue_
private

Referenced by println(), and run().

◆ messageQueueHead_

size_t LogThread::messageQueueHead_
private

Referenced by println(), and run().

◆ messageQueueTail_

size_t LogThread::messageQueueTail_
private

Referenced by println(), and run().

◆ mutex_

std::mutex LogThread::mutex_
private

Referenced by println(), run(), setCallback(), and stop().

◆ mutexCaller_

std::mutex LogThread::mutexCaller_
private

Referenced by run(), and stop().

◆ received_

bool LogThread::received_
private

Referenced by run(), and stop().

◆ running_

bool LogThread::running_
private

Referenced by run(), and stop().

◆ thread_

std::shared_ptr<std::thread> LogThread::thread_
private

Referenced by LogThread(), and stop().


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