CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | List of all members
ctkLogEntry Struct Referenceabstract

#include <Libs/PluginFramework/service/log/ctkLogEntry.h>

Public Member Functions

virtual ctkRuntimeExceptiongetException () const =0
 
virtual QString getFileName () const =0
 
virtual QString getFunctionName () const =0
 
virtual int getLevel () const =0
 
virtual int getLineNumber () const =0
 
virtual QString getMessage () const =0
 
virtual QSharedPointer< ctkPlugingetPlugin () const =0
 
virtual ctkServiceReference getServiceReference () const =0
 
virtual QDateTime getTime () const =0
 
virtual ~ctkLogEntry ()
 

Detailed Description

Provides methods to access the information contained in an individual Log Service log entry.

A ctkLogEntry object may be acquired from the ctkLogReaderService::getLog() method or by registering a ctkLogListener object.

Remarks
This class is thread safe.
See also
ctkLogReaderService::getLog()
ctkLogListener

Definition at line 50 of file ctkLogEntry.h.

Constructor & Destructor Documentation

◆ ~ctkLogEntry()

virtual ctkLogEntry::~ctkLogEntry ( )
inlinevirtual

Definition at line 52 of file ctkLogEntry.h.

Member Function Documentation

◆ getException()

virtual ctkRuntimeException* ctkLogEntry::getException ( ) const
pure virtual

Returns the exception object associated with this ctkLogEntry object.

In some implementations, the returned exception may not be the original exception. For example, STL exceptions associated with log entries may be wrapped in a derived ctkRuntimeException. The returned object will attempt to provide as much information as possible from the original exception object.

Returns
ctkRuntimeException object of the exception associated with this ctkLogEntry; null if no exception is associated with this ctkLogEntry object.

◆ getFileName()

virtual QString ctkLogEntry::getFileName ( ) const
pure virtual

Returns the absolute file name of the source file with which this ctkLogEntry is associated.

Returns
The source file name or an empty string if no information about the file name is available.

◆ getFunctionName()

virtual QString ctkLogEntry::getFunctionName ( ) const
pure virtual

Returns the function name of the calling function with which this ctkLogEntry is associated.

Returns
The function name or an empty string if no information about the function is available.

◆ getLevel()

virtual int ctkLogEntry::getLevel ( ) const
pure virtual

Returns the severity level of this ctkLogEntry object.

This is one of the severity levels defined by the ctkLogService interface.

Returns
Severity level of this ctkLogEntry object.
See also
ctkLogService::LOG_ERROR
ctkLogService::LOG_WARNING
ctkLogService::LOG_INFO
ctkLogService::LOG_DEBUG

◆ getLineNumber()

virtual int ctkLogEntry::getLineNumber ( ) const
pure virtual

Returns the line number in the source file with which this ctkLogEntry is associated.

Returns
The line number (a positive integer) or 0 if no information about the line number is available.

◆ getMessage()

virtual QString ctkLogEntry::getMessage ( ) const
pure virtual

Returns the human readable message associated with this ctkLogEntry object.

Returns
QString containing the message associated with this ctkLogEntry object.

◆ getPlugin()

virtual QSharedPointer<ctkPlugin> ctkLogEntry::getPlugin ( ) const
pure virtual

Returns the plugin that created this ctkLogEntry object.

Returns
The plugin that created this ctkLogEntry object; null if no plugins is associated with this ctkLogEntry object.

◆ getServiceReference()

virtual ctkServiceReference ctkLogEntry::getServiceReference ( ) const
pure virtual

Returns the ctkServiceReference object for the service associated with this ctkLogEntry object.

Returns
ctkServiceReference object for the service associated with this ctkLogEntry object; A default constructed object if no ctkServiceReference object was provided.

◆ getTime()

virtual QDateTime ctkLogEntry::getTime ( ) const
pure virtual

Returns the value of QDateTime::currentDateTime() at the time this ctkLogEntry object was created.

Returns
The system time when this ctkLogEntry object was created.
See also
"QDateTime::currentDateTime()"

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