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-2024 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 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36 
37 #ifndef __SCIP_TYPE_MESSAGE_H__
38 #define __SCIP_TYPE_MESSAGE_H__
39 
40 
41 #include <stdio.h>
42 
43 #include "scip/type_retcode.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /** verbosity levels of output */
51 {
52  SCIP_VERBLEVEL_NONE = 0, /**< only error and warning messages are displayed */
53  SCIP_VERBLEVEL_DIALOG = 1, /**< only interactive dialogs, errors, and warnings are displayed */
54  SCIP_VERBLEVEL_MINIMAL = 2, /**< only important messages are displayed */
55  SCIP_VERBLEVEL_NORMAL = 3, /**< standard messages are displayed */
56  SCIP_VERBLEVEL_HIGH = 4, /**< a lot of information is displayed */
57  SCIP_VERBLEVEL_FULL = 5 /**< all messages are displayed */
58 };
60 
61 typedef struct SCIP_Messagehdlr SCIP_MESSAGEHDLR; /**< message handler */
62 typedef struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA; /**< message handler data */
63 
64 /** generic messagehandler output function
65  *
66  * Should be equal to SCIP_DECL_MESSAGEWARNING, SCIP_DECL_MESSAGEDIALOG, and SCIP_DECL_MESSAGEINFO
67  */
68 #define SCIP_DECL_MESSAGEOUTPUTFUNC(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
69 
70 
71 /** error message print method
72  *
73  * This method is invoked, if SCIP wants to display an error message to the screen or a file.
74  *
75  * @note This function is independent of any message handler.
76  *
77  * input:
78  * - data : data pointer
79  * - file : file stream to print into
80  * - msg : string to output into the file (or NULL to flush)
81  */
82 #define SCIP_DECL_ERRORPRINTING(x) void x (void* data, FILE* file, const char* msg)
83 
84 /** warning message print method of message handler
85  *
86  * This method is invoked, if SCIP wants to display a warning message to the screen or a file.
87  *
88  * input:
89  * - messagehdlr : the message handler itself
90  * - file : file stream to print into
91  * - msg : string to output into the file (or NULL to flush)
92  */
93 #define SCIP_DECL_MESSAGEWARNING(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
94 
95 /** dialog message print method of message handler
96  *
97  * This method is invoked, if SCIP wants to display a dialog message to the screen or a file.
98  *
99  * input:
100  * - messagehdlr : the message handler itself
101  * - file : file stream to print into
102  * - msg : string to output into the file (or NULL to flush)
103  */
104 #define SCIP_DECL_MESSAGEDIALOG(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
105 
106 /** info message print method of message handler
107  *
108  * This method is invoked, if SCIP wants to display an information message to the screen or a file.
109  *
110  * input:
111  * - messagehdlr : the message handler itself
112  * - file : file stream to print into
113  * - msg : string to output into the file (or NULL to flush)
114  */
115 #define SCIP_DECL_MESSAGEINFO(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
116 
117 /** destructor of message handler to free message handler data
118  *
119  * This method is invoked, if SCIP wants to free a message handler.
120  *
121  * input:
122  * - messagehdlr : the message handler itself
123  */
124 #define SCIP_DECL_MESSAGEHDLRFREE(x) SCIP_RETCODE x (SCIP_MESSAGEHDLR* messagehdlr)
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif
struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA
Definition: type_message.h:62
enum SCIP_VerbLevel SCIP_VERBLEVEL
Definition: type_message.h:59
type definitions for return codes for SCIP methods
SCIP_VerbLevel
Definition: type_message.h:50