SimpleITK  
Public Member Functions | Static Public Member Functions | List of all members
itk::simple::LoggerBase Class Referenceabstract

A base class to handle SimpleITK and ITK messages and logging. More...

#include <sitkLogger.h>

+ Inheritance diagram for itk::simple::LoggerBase:
+ Collaboration diagram for itk::simple::LoggerBase:

Detailed Description

A base class to handle SimpleITK and ITK messages and logging.

In ITK this function is implemented by the itk::OutputWindow, but in SimpleITK it is called a logger.

Provides a base class for SimpleITK to provide the "DisplayText" methods that match the interface of itk::OutputWindow. Derived instances of LoggerBase are used by an internal adaptor derived from the itk::OutputWindow so that this object instances can be used in ITK.

See also
itk::OutputWindow

Definition at line 48 of file sitkLogger.h.

Public Member Functions

virtual void DisplayDebugText (const char *t)
 
virtual void DisplayErrorText (const char *t)
 
virtual void DisplayGenericOutputText (const char *t)
 
virtual void DisplayText (const char *t)=0
 
virtual void DisplayWarningText (const char *t)
 
std::string GetName () const override
 
 LoggerBase ()=default
 
virtual ITKLogger SetAsGlobalITKLogger ()
 
void SetName (const std::string &n) override
 
 ~LoggerBase () override
 
- Public Member Functions inherited from itk::simple::ObjectOwnedBase
 ObjectOwnedBase ()=default
 
virtual ~ObjectOwnedBase ()=0
 
- Public Member Functions inherited from itk::simple::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 

Static Public Member Functions

static ITKLogger GetGlobalITKLogger ()
 

Additional Inherited Members

- Protected Member Functions inherited from itk::simple::ObjectOwnedBase
virtual size_t AddObjectCallback (itk::Object *o, std::function< void()> onDelete)
 Register an Object and a method to call on this object's destructor. More...
 
 ObjectOwnedBase (const ObjectOwnedBase &o)
 Copy Constructor. More...
 
virtual size_t RemoveObject (const itk::Object *)
 
virtual void SetOwnedByObjects (bool o)
 
virtual bool GetOwnedByObjects () const
 
virtual void OwnedByObjectsOn ()
 
virtual void OwnedByObjectsOff ()
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()=default
 

Constructor & Destructor Documentation

◆ LoggerBase()

itk::simple::LoggerBase::LoggerBase ( )
default

◆ ~LoggerBase()

itk::simple::LoggerBase::~LoggerBase ( )
override

Member Function Documentation

◆ DisplayDebugText()

virtual void itk::simple::LoggerBase::DisplayDebugText ( const char *  t)
virtual

Reimplemented in itk::simple::SITK_FINAL.

◆ DisplayErrorText()

virtual void itk::simple::LoggerBase::DisplayErrorText ( const char *  t)
virtual

Reimplemented in itk::simple::SITK_FINAL.

◆ DisplayGenericOutputText()

virtual void itk::simple::LoggerBase::DisplayGenericOutputText ( const char *  t)
virtual

Reimplemented in itk::simple::SITK_FINAL.

◆ DisplayText()

virtual void itk::simple::LoggerBase::DisplayText ( const char *  t)
pure virtual

Implemented in itk::simple::SITK_FINAL.

◆ DisplayWarningText()

virtual void itk::simple::LoggerBase::DisplayWarningText ( const char *  t)
virtual

Reimplemented in itk::simple::SITK_FINAL.

◆ GetGlobalITKLogger()

static ITKLogger itk::simple::LoggerBase::GetGlobalITKLogger ( )
static

Get the current logger used by ITK.

Returns

◆ GetName()

std::string itk::simple::LoggerBase::GetName ( ) const
overridevirtual

Set object name.

Reimplemented from itk::simple::ObjectOwnedBase.

◆ SetAsGlobalITKLogger()

virtual ITKLogger itk::simple::LoggerBase::SetAsGlobalITKLogger ( )
virtual

Set this logger instance to the ITK output window.

After calling this method, all ITK and SimpleITK display, warning and error texts will be handled by this object's methods.

Returns
An ITKLogger object holding the previous itk::OutputWindow instance. The returned object can be used to restore the original instance.

Reimplemented in itk::simple::SITK_FINAL.

◆ SetName()

void itk::simple::LoggerBase::SetName ( const std::string &  name)
overridevirtual

Get object name.

Reimplemented from itk::simple::ObjectOwnedBase.


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