UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
hds::MessengerFile Class Reference

#include <hds_messenger_file.hpp>

Inheritance diagram for hds::MessengerFile:
hds::Messenger

Public Member Functions

 MessengerFile (const QString &log_file_name)
 
virtual ~MessengerFile ()
 
virtual void sendMsg (const hds::Messenger::Message &msg) const
 
virtual hds::Messenger::Message getMsg () const
 
bool isReady () const
 
void flush () const
 
- Public Member Functions inherited from hds::Messenger
 Messenger ()
 
virtual ~Messenger ()
 
void info (const QString &str) const
 
void warning (const QString &str) const
 
void error (const QString &str) const
 
void debug (const QString &str) const
 

Protected Member Functions

bool prepare (const QString &log_file_name)
 

Protected Attributes

QFile m_log_file
 
QTextStream m_log_stream
 
bool m_is_ready
 

Additional Inherited Members

- Public Types inherited from hds::Messenger
enum  MsgType {
  UNDEFINED_MSG = 0, INFO_MSG, WARNING_MSG, ERROR_MSG,
  DEBUG_MSG, SHOW_PROGRESS_MSG, HIDE_PROGRESS_MSG, SET_PROGRESS_VALUE_MSG,
  SET_PROGRESS_RANGES_MSG, SET_PROGRESS_STATUS_MSG
}
 

Detailed Description

Provides log messages sending to file.

Constructor & Destructor Documentation

hds::MessengerFile::MessengerFile ( const QString &  log_file_name)
Default constructor with log file name provided. 

Log file with provided name will be opened.

virtual hds::MessengerFile::~MessengerFile ( )
virtual

Destruct object and close log file.

Member Function Documentation

void hds::MessengerFile::flush ( ) const

Flushes any buffers to the log file.

virtual hds::Messenger::Message hds::MessengerFile::getMsg ( ) const
virtual

Nothing to do for file logger (always return false).

Implements hds::Messenger.

bool hds::MessengerFile::isReady ( ) const
inline

Is object ready to logging.

bool hds::MessengerFile::prepare ( const QString &  log_file_name)
protected

Open log file and prepare out text stream.

virtual void hds::MessengerFile::sendMsg ( const hds::Messenger::Message msg) const
virtual
Send message with provided type. Content of the message 

should be defined in compliance with the type.

Implements hds::Messenger.

Member Data Documentation

bool hds::MessengerFile::m_is_ready
protected

Is object ready to logging.

QFile hds::MessengerFile::m_log_file
protected

< Log file. Output text stream to log file.


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