OpenJPH
Open-source implementation of JPEG2000 Part-15
Loading...
Searching...
No Matches
ojph_message.h File Reference
#include <cstring>
#include "ojph_arch.h"

Go to the source code of this file.

Classes

class  ojph::message_base
 This is the base class from which all messaging levels are derived. More...
 
class  ojph::message_info
 Derived from message_base to handle info messages. More...
 
class  ojph::message_warning
 Derived from message_base to handle warning messages. More...
 
class  ojph::message_error
 Derived from message_base to handle error messages. More...
 

Namespaces

namespace  ojph
 

Macros

#define __OJPHFILE__    (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
 MACROS to remove the directory name from the file name.
 
#define OJPH_INFO(t, ...)    { ojph::get_info()[0](t, __OJPHFILE__, __LINE__, __VA_ARGS__); }
 MACROs to insert file and line number for info, warning, and error.
 
#define OJPH_WARN(t, ...)    { ojph::get_warning()[0](t, __OJPHFILE__, __LINE__, __VA_ARGS__); }
 
#define OJPH_ERROR(t, ...)    { ojph::get_error()[0](t, __OJPHFILE__, __LINE__,__VA_ARGS__); }
 

Enumerations

enum  ojph::OJPH_MSG_LEVEL : int {
  ojph::ALL_MSG = 0 , ojph::INFO = 1 , ojph::WARN = 2 , ojph::ERROR = 3 ,
  ojph::NO_MSG = 4
}
 This enum is use to specify the level of severity of message while processing markers. More...
 

Functions

OJPH_EXPORT void ojph::set_info_stream (FILE *s)
 Replaces the info output file from the default stdout to user defined output file.
 
OJPH_EXPORT void ojph::configure_info (message_info *info)
 This overrides the default behaviour of handling info messages.
 
OJPH_EXPORT message_infoojph::get_info ()
 Get the info message object, whose operator() member class is called for info messages – See the macros below.
 
OJPH_EXPORT void ojph::set_warning_stream (FILE *s)
 Replaces the warning output file from the default stdout to user defined output file.
 
OJPH_EXPORT void ojph::configure_warning (message_warning *warn)
 This overrides the default behaviour of handling warning messages.
 
OJPH_EXPORT message_warningojph::get_warning ()
 Get the warning message object, whose operator() member class is called for warning messages – See the macros below.
 
OJPH_EXPORT void ojph::set_error_stream (FILE *s)
 Replaces the error output file from the default stderr to user defined output file.
 
OJPH_EXPORT void ojph::configure_error (message_error *error)
 This overrides the default behaviour of handling error messages.
 
OJPH_EXPORT message_errorojph::get_error ()
 Get the error message object, whose operator() member class is called for error messages – See the macros below.
 
OJPH_EXPORT void ojph::set_message_level (OJPH_MSG_LEVEL level)
 Sets the minimum severity of the message to be reported.
 

Macro Definition Documentation

◆ __OJPHFILE__

#define __OJPHFILE__    (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)

MACROS to remove the directory name from the file name.

Definition at line 275 of file ojph_message.h.

◆ OJPH_ERROR

#define OJPH_ERROR (   t,
  ... 
)     { ojph::get_error()[0](t, __OJPHFILE__, __LINE__,__VA_ARGS__); }

Definition at line 287 of file ojph_message.h.

◆ OJPH_INFO

#define OJPH_INFO (   t,
  ... 
)     { ojph::get_info()[0](t, __OJPHFILE__, __LINE__, __VA_ARGS__); }

MACROs to insert file and line number for info, warning, and error.

Definition at line 283 of file ojph_message.h.

◆ OJPH_WARN

#define OJPH_WARN (   t,
  ... 
)     { ojph::get_warning()[0](t, __OJPHFILE__, __LINE__, __VA_ARGS__); }

Definition at line 285 of file ojph_message.h.