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
ctkLogReaderService Struct Referenceabstract

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

Public Member Functions

virtual bool connectLogListener (const QObject *receiver, const char *slot)=0
 
virtual QList< ctkLogEntryPtrgetLog ()=0
 
virtual ~ctkLogReaderService ()
 

Detailed Description

Provides methods to retrieve ctkLogEntry objects from the log.

There are three ways to retrieve ctkLogEntry objects:

Remarks
This class is thread safe.
See also
ctkLogEntry
ctkLogListener
ctkLogListener::logged(ctkLogEntryPtr)

Definition at line 54 of file ctkLogReaderService.h.

Constructor & Destructor Documentation

◆ ~ctkLogReaderService()

virtual ctkLogReaderService::~ctkLogReaderService ( )
inlinevirtual

Definition at line 56 of file ctkLogReaderService.h.

Member Function Documentation

◆ connectLogListener()

virtual bool ctkLogReaderService::connectLogListener ( const QObject *  receiver,
const char *  slot 
)
pure virtual

Subscribes to ctkLogEntry objects.

This method connects a Qt slot with the Log Reader Service. The slot must take a ctkLogEntryPtr as the only argument and will be called for each ctkLogEntry object placed into the log.

When a plugin which connects a Qt slot is stopped, the Log Reader Service must disconnect all of the plugin's connected slots.

If the same slot from the same object is already connected, this method does nothing.

Parameters
receiverThe object to connect to.
slotThe name of the slot to be connected.
Returns
true if the connection was successfull; false otherwise.
See also
ctkLogListener
ctkLogEntry
ctkLogListener::logged(ctkLogEntryPtr)

◆ getLog()

virtual QList<ctkLogEntryPtr> ctkLogReaderService::getLog ( )
pure virtual

Returns a QList of all ctkLogEntry objects in the log.

Each element of the QList is a ctkLogEntry object, ordered with the most recent entry first. Whether the list is of all ctkLogEntry objects since the Log Service was started or some recent past is implementation-specific. Also implementation-specific is whether informational and debug ctkLogEntry objects are included in the list.

Returns
A QList of all ctkLogEntry objects in the log.

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