Grok 20.3.2
ojph_message.h File Reference
#include <cstring>
#include "ojph_arch.h"

Go to the source code of this file.

Classes

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

Namespaces

namespace  grk
 ResWindow.
namespace  grk::t1
namespace  grk::t1::ojph

Macros

#define __OJPHFILE__   (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
 MACROS to remove the directory name from the file name.
#define OJPH_INFO(t, ...)
 MACROs to insert file and line number for info, warning, and error.
#define OJPH_WARN(t, ...)
#define OJPH_ERROR(t, ...)

Enumerations

enum  grk::t1::ojph::OJPH_MSG_LEVEL : int {
  grk::t1::ojph::OJPH_MSG_ALL_MSG = 0 , grk::t1::ojph::OJPH_MSG_INFO = 1 , grk::t1::ojph::OJPH_MSG_WARN = 2 , grk::t1::ojph::OJPH_MSG_ERROR = 3 ,
  grk::t1::ojph::OJPH_MSG_NO_MSG = 4
}
 This enum is use to specify the level of severity of message while processing markers. More...

Functions

OJPH_EXPORT void grk::t1::ojph::set_info_stream (FILE *s)
 Replaces the info output file from the default stdout to user defined output file.
OJPH_EXPORT void grk::t1::ojph::configure_info (message_info *info)
 This overrides the default behaviour of handling info messages.
OJPH_EXPORT message_infogrk::t1::ojph::get_info ()
 Get the info message object, whose operator() member class is called for info messages – See the macros below.
OJPH_EXPORT void grk::t1::ojph::set_warning_stream (FILE *s)
 Replaces the warning output file from the default stdout to user defined output file.
OJPH_EXPORT void grk::t1::ojph::configure_warning (message_warning *warn)
 This overrides the default behaviour of handling warning messages.
OJPH_EXPORT message_warninggrk::t1::ojph::get_warning ()
 Get the warning message object, whose operator() member class is called for warning messages – See the macros below.
OJPH_EXPORT void grk::t1::ojph::set_error_stream (FILE *s)
 Replaces the error output file from the default stderr to user defined output file.
OJPH_EXPORT void grk::t1::ojph::configure_error (message_error *error)
 This overrides the default behaviour of handling error messages.
OJPH_EXPORT message_errorgrk::t1::ojph::get_error ()
 Get the error message object, whose operator() member class is called for error messages – See the macros below.
OJPH_EXPORT void grk::t1::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.

◆ OJPH_ERROR

#define OJPH_ERROR ( t,
... )
Value:
{ grk::t1::ojph::get_error()[0](t, __OJPHFILE__, __LINE__,__VA_ARGS__); }
OJPH_EXPORT message_error * get_error()
Get the error message object, whose operator() member class is called for error messages – See the ma...
Definition ojph_message.cpp:144
#define __OJPHFILE__
MACROS to remove the directory name from the file name.
Definition ojph_message.h:276

Referenced by grk::t1::ojph::mem_fixed_allocator::alloc(), grk::t1::ojph::local::mel_emit_bit(), grk::t1::ojph::local::ms_encode(), grk::t1::ojph::local::ms_encode64(), grk::t1::ojph::local::ms_terminate(), grk::t1::ojph::local::terminate_mel_vlc(), and grk::t1::ojph::local::vlc_encode().

◆ OJPH_INFO

#define OJPH_INFO ( t,
... )
Value:
{ grk::t1::ojph::get_info()[0](t, __OJPHFILE__, __LINE__, __VA_ARGS__); }
OJPH_EXPORT message_info * get_info()
Get the info message object, whose operator() member class is called for info messages – See the macr...
Definition ojph_message.cpp:62

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

◆ OJPH_WARN

#define OJPH_WARN ( t,
... )
Value:
{ grk::t1::ojph::get_warning()[0](t, __OJPHFILE__, __LINE__, __VA_ARGS__); }
OJPH_EXPORT message_warning * get_warning()
Get the warning message object, whose operator() member class is called for warning messages – See th...
Definition ojph_message.cpp:103

Referenced by grk::t1::ojph::local::ojph_decode_codeblock32(), grk::t1::ojph::local::ojph_decode_codeblock64(), and grk::t1::ojph::local::ojph_decode_codeblock_wasm().