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-2017 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file type_message.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for message output methods
19  * @author Tobias Achterberg
20  *
21  * This file defines the interface for message handlers implemented in C.
22  *
23  * - \ref scip::ObjMessagehdlr "C++ wrapper class"
24  */
25 
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
27 
28 #ifndef __SCIP_TYPE_MESSAGE_H__
29 #define __SCIP_TYPE_MESSAGE_H__
30 
31 
32 #include <stdio.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** verbosity levels of output */
40 {
41  SCIP_VERBLEVEL_NONE = 0, /**< only error and warning messages are displayed */
42  SCIP_VERBLEVEL_DIALOG = 1, /**< only interactive dialogs, errors, and warnings are displayed */
43  SCIP_VERBLEVEL_MINIMAL = 2, /**< only important messages are displayed */
44  SCIP_VERBLEVEL_NORMAL = 3, /**< standard messages are displayed */
45  SCIP_VERBLEVEL_HIGH = 4, /**< a lot of information is displayed */
46  SCIP_VERBLEVEL_FULL = 5 /**< all messages are displayed */
47 };
49 
50 typedef struct SCIP_Messagehdlr SCIP_MESSAGEHDLR; /**< message handler */
51 typedef struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA; /**< message handler data */
52 
53 /** generic messagehandler output function
54  *
55  * Should be equal to SCIP_DECL_MESSAGEWARNING, SCIP_DECL_MESSAGEDIALOG, and SCIP_DECL_MESSAGEINFO
56  */
57 #define SCIP_DECL_MESSAGEOUTPUTFUNC(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
58 
59 
60 /** error message print method
61  *
62  * This method is invoked, if SCIP wants to display an error message to the screen or a file.
63  *
64  * @note This function is independent of any message handler.
65  *
66  * input:
67  * - data : data pointer
68  * - file : file stream to print into
69  * - msg : string to output into the file (or NULL to flush)
70  */
71 #define SCIP_DECL_ERRORPRINTING(x) void x (void* data, FILE* file, const char* msg)
72 
73 /** warning message print method of message handler
74  *
75  * This method is invoked, if SCIP wants to display a warning message to the screen or a file.
76  *
77  * input:
78  * - messagehdlr : the message handler itself
79  * - file : file stream to print into
80  * - msg : string to output into the file (or NULL to flush)
81  */
82 #define SCIP_DECL_MESSAGEWARNING(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
83 
84 /** dialog message print method of message handler
85  *
86  * This method is invoked, if SCIP wants to display a dialog 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_MESSAGEDIALOG(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
94 
95 /** info message print method of message handler
96  *
97  * This method is invoked, if SCIP wants to display an information 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_MESSAGEINFO(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
105 
106 /** destructor of message handler to free message handler data
107  *
108  * This method is invoked, if SCIP wants to free a message handler.
109  *
110  * input:
111  * - messagehdlr : the message handler itself
112  */
113 #define SCIP_DECL_MESSAGEHDLRFREE(x) SCIP_RETCODE x (SCIP_MESSAGEHDLR* messagehdlr)
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif
struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA
Definition: type_message.h:51
enum SCIP_VerbLevel SCIP_VERBLEVEL
Definition: type_message.h:48
SCIP_VerbLevel
Definition: type_message.h:39