Scippy

    SCIP

    Solving Constraint Integer Programs

    type_message.h
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
    7/* */
    8/* Licensed under the Apache License, Version 2.0 (the "License"); */
    9/* you may not use this file except in compliance with the License. */
    10/* You may obtain a copy of the License at */
    11/* */
    12/* http://www.apache.org/licenses/LICENSE-2.0 */
    13/* */
    14/* Unless required by applicable law or agreed to in writing, software */
    15/* distributed under the License is distributed on an "AS IS" BASIS, */
    16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
    17/* See the License for the specific language governing permissions and */
    18/* limitations under the License. */
    19/* */
    20/* You should have received a copy of the Apache-2.0 license */
    21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
    22/* */
    23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    24
    25/**@file type_message.h
    26 * @ingroup TYPEDEFINITIONS
    27 * @brief type definitions for message output methods
    28 * @author Tobias Achterberg
    29 *
    30 * This file defines the interface for message handlers implemented in C.
    31 *
    32 * - \ref scip::ObjMessagehdlr "C++ wrapper class"
    33 */
    34
    35/** @defgroup DEFPLUGINS_MSGHDLR Default message handlers
    36 * @ingroup DEFPLUGINS
    37 * @brief implementation files (.c files) of the default message handlers of SCIP
    38 */
    39
    40/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    41
    42#ifndef __SCIP_TYPE_MESSAGE_H__
    43#define __SCIP_TYPE_MESSAGE_H__
    44
    45
    46#include <stdio.h>
    47
    48#include "scip/type_retcode.h"
    49
    50#ifdef __cplusplus
    51extern "C" {
    52#endif
    53
    54/** verbosity levels of output */
    56{
    57 SCIP_VERBLEVEL_NONE = 0, /**< only error and warning messages are displayed */
    58 SCIP_VERBLEVEL_DIALOG = 1, /**< only interactive dialogs, errors, and warnings are displayed */
    59 SCIP_VERBLEVEL_MINIMAL = 2, /**< only important messages are displayed */
    60 SCIP_VERBLEVEL_NORMAL = 3, /**< standard messages are displayed */
    61 SCIP_VERBLEVEL_HIGH = 4, /**< a lot of information is displayed */
    62 SCIP_VERBLEVEL_FULL = 5 /**< all messages are displayed */
    63};
    65
    66typedef struct SCIP_Messagehdlr SCIP_MESSAGEHDLR; /**< message handler */
    67typedef struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA; /**< message handler data */
    68
    69/** generic messagehandler output function
    70 *
    71 * Should be equal to SCIP_DECL_MESSAGEWARNING, SCIP_DECL_MESSAGEDIALOG, and SCIP_DECL_MESSAGEINFO
    72 */
    73#define SCIP_DECL_MESSAGEOUTPUTFUNC(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
    74
    75
    76/** error message print method
    77 *
    78 * This method is invoked, if SCIP wants to display an error message to the screen or a file.
    79 *
    80 * @note This function is independent of any message handler.
    81 *
    82 * input:
    83 * - data : data pointer
    84 * - file : file stream to print into
    85 * - msg : string to output into the file (or NULL to flush)
    86 */
    87#define SCIP_DECL_ERRORPRINTING(x) void x (void* data, FILE* file, const char* msg)
    88
    89/** warning message print method of message handler
    90 *
    91 * This method is invoked, if SCIP wants to display a warning message to the screen or a file.
    92 *
    93 * input:
    94 * - messagehdlr : the message handler itself
    95 * - file : file stream to print into
    96 * - msg : string to output into the file (or NULL to flush)
    97 */
    98#define SCIP_DECL_MESSAGEWARNING(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
    99
    100/** dialog message print method of message handler
    101 *
    102 * This method is invoked, if SCIP wants to display a dialog message to the screen or a file.
    103 *
    104 * input:
    105 * - messagehdlr : the message handler itself
    106 * - file : file stream to print into
    107 * - msg : string to output into the file (or NULL to flush)
    108 */
    109#define SCIP_DECL_MESSAGEDIALOG(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
    110
    111/** info message print method of message handler
    112 *
    113 * This method is invoked, if SCIP wants to display an information message to the screen or a file.
    114 *
    115 * input:
    116 * - messagehdlr : the message handler itself
    117 * - file : file stream to print into
    118 * - msg : string to output into the file (or NULL to flush)
    119 */
    120#define SCIP_DECL_MESSAGEINFO(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
    121
    122/** destructor of message handler to free message handler data
    123 *
    124 * This method is invoked, if SCIP wants to free a message handler.
    125 *
    126 * input:
    127 * - messagehdlr : the message handler itself
    128 */
    129#define SCIP_DECL_MESSAGEHDLRFREE(x) SCIP_RETCODE x (SCIP_MESSAGEHDLR* messagehdlr)
    130
    131#ifdef __cplusplus
    132}
    133#endif
    134
    135#endif
    enum SCIP_VerbLevel SCIP_VERBLEVEL
    Definition: type_message.h:64
    SCIP_VerbLevel
    Definition: type_message.h:56
    @ SCIP_VERBLEVEL_DIALOG
    Definition: type_message.h:58
    @ SCIP_VERBLEVEL_NONE
    Definition: type_message.h:57
    @ SCIP_VERBLEVEL_MINIMAL
    Definition: type_message.h:59
    @ SCIP_VERBLEVEL_HIGH
    Definition: type_message.h:61
    @ SCIP_VERBLEVEL_NORMAL
    Definition: type_message.h:60
    @ SCIP_VERBLEVEL_FULL
    Definition: type_message.h:62
    struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA
    Definition: type_message.h:67
    type definitions for return codes for SCIP methods