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