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-2016 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  * - msg : string to output into the file (or NULL to flush)
68  * - data : data pointer
69  */
70 #define SCIP_DECL_ERRORPRINTING(x) void x (const char* msg, void* data)
71 
72 /** warning message print method of message handler
73  *
74  * This method is invoked, if SCIP wants to display a warning message to the screen or a file
75  *
76  * input:
77  * - messagehdlr : the message handler itself
78  * - file : file stream to print into
79  * - msg : string to output into the file (or NULL to flush)
80  */
81 #define SCIP_DECL_MESSAGEWARNING(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
82 
83 /** dialog message print method of message handler
84  *
85  * This method is invoked, if SCIP wants to display a dialog message to the screen or a file
86  *
87  * input:
88  * - messagehdlr : the message handler itself
89  * - file : file stream to print into
90  * - msg : string to output into the file (or NULL to flush)
91  */
92 #define SCIP_DECL_MESSAGEDIALOG(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
93 
94 /** info message print method of message handler
95  *
96  * This method is invoked, if SCIP wants to display an information message to the screen or a file
97  *
98  * input:
99  * - messagehdlr : the message handler itself
100  * - file : file stream to print into
101  * - msg : string to output into the file (or NULL to flush)
102  */
103 #define SCIP_DECL_MESSAGEINFO(x) void x (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg)
104 
105 /** destructor of message handler to free message handler data
106  *
107  * This method is invoked, if SCIP wants to display an information message to the screen or a file
108  *
109  * input:
110  * - messagehdlr : the message handler itself
111  */
112 #define SCIP_DECL_MESSAGEHDLRFREE(x) SCIP_RETCODE x (SCIP_MESSAGEHDLR* messagehdlr)
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif
struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA
Definition: type_message.h:51
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
Definition: type_message.h:50
enum SCIP_VerbLevel SCIP_VERBLEVEL
Definition: type_message.h:48
SCIP_VerbLevel
Definition: type_message.h:39