Orfeo Toolbox  4.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Types | Private Attributes | List of all members
itk::LoggerThreadWrapper< SimpleLoggerType > Class Template Reference

Used for providing logging service as a separate thread. More...

#include <itkLoggerThreadWrapper.h>

+ Inheritance diagram for itk::LoggerThreadWrapper< SimpleLoggerType >:
+ Collaboration diagram for itk::LoggerThreadWrapper< SimpleLoggerType >:

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef unsigned int DelayType
 
enum  OperationType {
  SET_PRIORITY_LEVEL,
  SET_LEVEL_FOR_FLUSHING,
  ADD_LOG_OUTPUT,
  WRITE,
  FLUSH
}
 
typedef
SimpleLoggerType::OutputType 
OutputType
 
typedef SmartPointer< SelfPointer
 
typedef
SimpleLoggerType::PriorityLevelType 
PriorityLevelType
 
typedef LoggerThreadWrapper Self
 
typedef SimpleLoggerType Superclass
 

Public Member Functions

virtual void AddLogOutput (OutputType *output)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual void Flush ()
 
virtual DelayType GetDelay () const
 
virtual PriorityLevelType GetLevelForFlushing () const
 
virtual const char * GetNameOfClass () const
 
virtual PriorityLevelType GetPriorityLevel () const
 
virtual void SetDelay (DelayType delay)
 
virtual void SetLevelForFlushing (PriorityLevelType level)
 
virtual void SetPriorityLevel (PriorityLevelType level)
 
virtual void Write (PriorityLevelType level, std::string const &content)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 LoggerThreadWrapper ()
 
virtual ~LoggerThreadWrapper ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE ThreadFunction (void *)
 

Private Types

typedef std::queue
< PriorityLevelType
LevelContainerType
 
typedef std::queue< std::string > MessageContainerType
 
typedef std::queue< OperationTypeOperationContainerType
 
typedef std::queue< typename
OutputType::Pointer > 
OutputContainerType
 

Private Attributes

DelayType m_Delay
 
LevelContainerType m_LevelQ
 
MessageContainerType m_MessageQ
 
SimpleFastMutexLock m_Mutex
 
OperationContainerType m_OperationQ
 
OutputContainerType m_OutputQ
 
MultiThreader::Pointer m_Threader
 
ThreadIdType m_ThreadID
 

Detailed Description

template<typename SimpleLoggerType>
class itk::LoggerThreadWrapper< SimpleLoggerType >

Used for providing logging service as a separate thread.

Author
Hee-Su Kim, Compute Science Dept. Kyungpook National University, ISIS Center, Georgetown University.

Definition at line 40 of file itkLoggerThreadWrapper.h.

Member Typedef Documentation

template<typename SimpleLoggerType>
typedef SmartPointer< const Self > itk::LoggerThreadWrapper< SimpleLoggerType >::ConstPointer

Definition at line 47 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef unsigned int itk::LoggerThreadWrapper< SimpleLoggerType >::DelayType

Definition at line 57 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef std::queue< PriorityLevelType > itk::LoggerThreadWrapper< SimpleLoggerType >::LevelContainerType
private

Definition at line 118 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef std::queue< std::string > itk::LoggerThreadWrapper< SimpleLoggerType >::MessageContainerType
private

Definition at line 116 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef std::queue< OperationType > itk::LoggerThreadWrapper< SimpleLoggerType >::OperationContainerType
private

Definition at line 114 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef std::queue< typename OutputType::Pointer > itk::LoggerThreadWrapper< SimpleLoggerType >::OutputContainerType
private

Definition at line 120 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef SimpleLoggerType::OutputType itk::LoggerThreadWrapper< SimpleLoggerType >::OutputType

Definition at line 53 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef SmartPointer< Self > itk::LoggerThreadWrapper< SimpleLoggerType >::Pointer

Definition at line 46 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef SimpleLoggerType::PriorityLevelType itk::LoggerThreadWrapper< SimpleLoggerType >::PriorityLevelType

Definition at line 56 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef LoggerThreadWrapper itk::LoggerThreadWrapper< SimpleLoggerType >::Self

Definition at line 44 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
typedef SimpleLoggerType itk::LoggerThreadWrapper< SimpleLoggerType >::Superclass

Definition at line 45 of file itkLoggerThreadWrapper.h.

Member Enumeration Documentation

template<typename SimpleLoggerType>
enum itk::LoggerThreadWrapper::OperationType

Definition of types of operations for LoggerThreadWrapper.

Enumerator
SET_PRIORITY_LEVEL 
SET_LEVEL_FOR_FLUSHING 
ADD_LOG_OUTPUT 
WRITE 
FLUSH 

Definition at line 60 of file itkLoggerThreadWrapper.h.

Constructor & Destructor Documentation

template<typename SimpleLoggerType >
itk::LoggerThreadWrapper< SimpleLoggerType >::LoggerThreadWrapper ( )
protected

Constructor

Definition at line 154 of file itkLoggerThreadWrapper.hxx.

References itk::MultiThreader::New().

template<typename SimpleLoggerType >
itk::LoggerThreadWrapper< SimpleLoggerType >::~LoggerThreadWrapper ( )
protectedvirtual

Destructor

Definition at line 163 of file itkLoggerThreadWrapper.hxx.

Member Function Documentation

template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::AddLogOutput ( OutputType output)
virtual

Registers another output stream with the multiple output.

Adds an output stream to the MultipleLogOutput for writing.

Definition at line 89 of file itkLoggerThreadWrapper.hxx.

Referenced by itk::LoggerThreadWrapper< SimpleLoggerType >::ThreadFunction().

template<typename SimpleLoggerType>
virtual::itk::LightObject::Pointer itk::LoggerThreadWrapper< SimpleLoggerType >::CreateAnother ( void  ) const
template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::Flush ( void  )
virtual

Definition at line 115 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType >
LoggerThreadWrapper< SimpleLoggerType >::DelayType itk::LoggerThreadWrapper< SimpleLoggerType >::GetDelay ( ) const
virtual

Get the delay in milliseconds between checks to see if there are any low priority messages to be processed.

Definition at line 79 of file itkLoggerThreadWrapper.hxx.

Referenced by itk::LoggerThreadWrapper< SimpleLoggerType >::ThreadFunction().

template<typename SimpleLoggerType >
SimpleLoggerType::PriorityLevelType itk::LoggerThreadWrapper< SimpleLoggerType >::GetLevelForFlushing ( ) const
virtual

Definition at line 62 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType>
virtual const char* itk::LoggerThreadWrapper< SimpleLoggerType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

template<typename SimpleLoggerType >
SimpleLoggerType::PriorityLevelType itk::LoggerThreadWrapper< SimpleLoggerType >::GetPriorityLevel ( ) const
virtual

Get the priority level for the current logger. Only messages that have priorities equal or greater than the one set here will be posted to the current outputs

Definition at line 43 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType>
static Pointer itk::LoggerThreadWrapper< SimpleLoggerType >::New ( )
static

New macro for creation of through a Smart Pointer

template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Print contents of a LoggerThreadWrapper

Definition at line 239 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::SetDelay ( DelayType  delay)
virtual

Set the delay in milliseconds between checks to see if there are any low priority messages to be processed.

Definition at line 71 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::SetLevelForFlushing ( PriorityLevelType  level)
virtual

Definition at line 52 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::SetPriorityLevel ( PriorityLevelType  level)
virtual

Set the priority level for the current logger. Only messages that have priorities equal or greater than the one set here will be posted to the current outputs

Definition at line 31 of file itkLoggerThreadWrapper.hxx.

template<typename SimpleLoggerType >
ITK_THREAD_RETURN_TYPE itk::LoggerThreadWrapper< SimpleLoggerType >::ThreadFunction ( void *  pInfoStruct)
staticprotected
template<typename SimpleLoggerType >
void itk::LoggerThreadWrapper< SimpleLoggerType >::Write ( PriorityLevelType  level,
std::string const &  content 
)
virtual

Definition at line 98 of file itkLoggerThreadWrapper.hxx.

Member Data Documentation

template<typename SimpleLoggerType>
DelayType itk::LoggerThreadWrapper< SimpleLoggerType >::m_Delay
private

Definition at line 136 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
LevelContainerType itk::LoggerThreadWrapper< SimpleLoggerType >::m_LevelQ
private
template<typename SimpleLoggerType>
MessageContainerType itk::LoggerThreadWrapper< SimpleLoggerType >::m_MessageQ
private
template<typename SimpleLoggerType>
SimpleFastMutexLock itk::LoggerThreadWrapper< SimpleLoggerType >::m_Mutex
private
template<typename SimpleLoggerType>
OperationContainerType itk::LoggerThreadWrapper< SimpleLoggerType >::m_OperationQ
private
template<typename SimpleLoggerType>
OutputContainerType itk::LoggerThreadWrapper< SimpleLoggerType >::m_OutputQ
private
template<typename SimpleLoggerType>
MultiThreader::Pointer itk::LoggerThreadWrapper< SimpleLoggerType >::m_Threader
private

Definition at line 122 of file itkLoggerThreadWrapper.h.

template<typename SimpleLoggerType>
ThreadIdType itk::LoggerThreadWrapper< SimpleLoggerType >::m_ThreadID
private

Definition at line 124 of file itkLoggerThreadWrapper.h.


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

Generated at Sat Mar 8 2014 17:21:52 for Orfeo Toolbox with doxygen 1.8.3.1