imaging::MessageInterface Class Reference
[Core Module]

Abstract class interface for displaying log messages. More...

#include <MessageInterface.hpp>

Inheritance diagram for imaging::MessageInterface:

imaging::Cmessage

List of all members.

Public Types

enum  priority_levels { DEBUG_ONLY, LESS_IMPORTANT, IMPORTANT }

Public Member Functions

virtual void operator() (const std::string &message, const int priority_level, int intend=0)=0
virtual void operator() (int intend)=0

Static Public Attributes

static MessageInterfaceout


Detailed Description

Abstract class interface for displaying log messages.

This class defines the imaging2 log message interface. The user can pass log messages to the static member out and associate an intendation level and a priority with them. The implementation of MessageInterface is responsible for displaying them accordingly.

Here is an example on how MessageInterface can be used. Note that for this function to work properly an implementation of MessageInterface has to be included in the final application:

  #include <core/MessageInterface.hpp> 
  
  using imaging;
  
  void some_function()
  {
    MessageInterface::out("Enter some function.", MessageInterface::IMPORTANT);
    
    MessageInterface::out("Process data.", MessageInterface::LESS_IMPORTANT, +1);
    MessageInterface::out("Data seems okay.", MessageInterface::DEBUG_ONLY, +1);
    
    MessageInterface::out("Exit some function.", MessageInterface::IMPORTANT);
  }

Member Enumeration Documentation

Different priority levels which determine how important a message is.

Enumerator:
DEBUG_ONLY  Debug message.
LESS_IMPORTANT  Not so important message.
IMPORTANT  Important message.


Member Function Documentation

virtual void imaging::MessageInterface::operator() ( const std::string &  message,
const int  priority_level,
int  intend = 0 
) [pure virtual]

Prints message. The priority and the level of intendation relative to the global intendation are determined by priority_level and intend. The specified intendentation is valid for this message only does not change the global intendation.

Implemented in imaging::Cmessage.

virtual void imaging::MessageInterface::operator() ( int  intend  )  [pure virtual]

Changes the global intendentation by intend.

Implemented in imaging::Cmessage.


Member Data Documentation


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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5