Scippy

SCIP

Solving Constraint Integer Programs

message.c File Reference

Detailed Description

message output methods

Author
Tobias Achterberg
Marc Pfetsch
Michael Winkler

Definition in file message.c.

#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#include "scip/type_message.h"
#include "scip/struct_message.h"
#include "scip/def.h"
#include "scip/pub_misc.h"
#include "blockmemshell/memory.h"

Go to the source code of this file.

Macros

#define va_copy(dest, src)   do { BMScopyMemory(&dest, &src); } while( 0 )
 

Functions

static void handleMessage (SCIP_MESSAGEHDLR *messagehdlr, SCIP_DECL_MESSAGEOUTPUTFUNC(outputfunc), FILE *file1, SCIP_Bool usefile1, FILE *file2, SCIP_Bool usefile2, const char *msg, char *buffer, int *bufferlen)
 
static SCIP_DECL_ERRORPRINTING (errorPrintingDefault)
 
static SCIP_DECL_ERRORPRINTING ((*staticErrorPrinting))
 
static void messagePrintError (FILE *file, const char *msg)
 
static void messagePrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *msg)
 
static void messagePrintDialog (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg)
 
static void messagePrintInfo (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg)
 
static void messagehdlrOpenLogfile (SCIP_MESSAGEHDLR *messagehdlr, const char *filename)
 
static SCIP_RETCODE messagehdlrFree (SCIP_MESSAGEHDLR **messagehdlr)
 
SCIP_RETCODE SCIPmessagehdlrCreate (SCIP_MESSAGEHDLR **messagehdlr, SCIP_Bool bufferedoutput, const char *filename, SCIP_Bool quiet, SCIP_DECL_MESSAGEWARNING((*messagewarning)), SCIP_DECL_MESSAGEDIALOG((*messagedialog)), SCIP_DECL_MESSAGEINFO((*messageinfo)), SCIP_DECL_MESSAGEHDLRFREE((*messagehdlrfree)), SCIP_MESSAGEHDLRDATA *messagehdlrdata)
 
void SCIPmessagehdlrCapture (SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_RETCODE SCIPmessagehdlrRelease (SCIP_MESSAGEHDLR **messagehdlr)
 
SCIP_RETCODE SCIPmessagehdlrSetData (SCIP_MESSAGEHDLR *messagehdlr, SCIP_MESSAGEHDLRDATA *messagehdlrdata)
 
void SCIPmessagehdlrSetLogfile (SCIP_MESSAGEHDLR *messagehdlr, const char *filename)
 
void SCIPmessagehdlrSetQuiet (SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
 
void SCIPmessagePrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVPrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVFPrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessagePrintDialog (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVPrintDialog (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintDialog (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
 
void SCIPmessageVFPrintDialog (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr, va_list ap)
 
void SCIPmessagePrintInfo (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVPrintInfo (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintInfo (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
 
void SCIPmessageVFPrintInfo (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr, va_list ap)
 
void SCIPmessagePrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, const char *formatstr,...)
 
void SCIPmessageVPrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
 
void SCIPmessageVFPrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr, va_list ap)
 
void SCIPmessagePrintErrorHeader (const char *sourcefile, int sourceline)
 
void SCIPmessagePrintError (const char *formatstr,...)
 
void SCIPmessageVPrintError (const char *formatstr, va_list ap)
 
void SCIPmessageSetErrorPrinting (SCIP_DECL_ERRORPRINTING((*errorPrinting)), void *data)
 
void SCIPmessageSetErrorPrintingDefault (void)
 
SCIP_MESSAGEHDLRDATASCIPmessagehdlrGetData (SCIP_MESSAGEHDLR *messagehdlr)
 
FILE * SCIPmessagehdlrGetLogfile (SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_Bool SCIPmessagehdlrIsQuiet (SCIP_MESSAGEHDLR *messagehdlr)
 

Variables

static void * staticErrorPrintingData = NULL
 

Macro Definition Documentation

◆ va_copy

#define va_copy (   dest,
  src 
)    do { BMScopyMemory(&dest, &src); } while( 0 )

Function Documentation

◆ handleMessage()

static void handleMessage ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_DECL_MESSAGEOUTPUTFUNC(outputfunc)  ,
FILE *  file1,
SCIP_Bool  usefile1,
FILE *  file2,
SCIP_Bool  usefile2,
const char *  msg,
char *  buffer,
int *  bufferlen 
)
static

handles the output of the given message

Parameters
messagehdlrmessage handler
file1file stream to print into, or NULL for stdout
usefile1Should file1 be used?
file2file stream to print into
usefile2Should file2 be used?
msgmessage to print; NULL to flush the output buffer
buffermessage buffer
bufferlenpointer to the currently used entries in the message buffer

Definition at line 48 of file message.c.

References SCIP_MAXSTRLEN.

Referenced by messagePrintDialog(), messagePrintInfo(), and messagePrintWarning().

◆ SCIP_DECL_ERRORPRINTING() [1/2]

static SCIP_DECL_ERRORPRINTING ( errorPrintingDefault  )
static

default error printing method which is used to print all occurring errors

Definition at line 129 of file message.c.

◆ SCIP_DECL_ERRORPRINTING() [2/2]

static SCIP_DECL_ERRORPRINTING ( staticErrorPrinting)
static

static variable which holds the error printing method

◆ messagePrintError()

static void messagePrintError ( FILE *  file,
const char *  msg 
)
static

prints error message with the current static message handler

Parameters
filefile stream to print error, or NULL for stderr
msgmessage to print; NULL to flush the output buffer

Definition at line 149 of file message.c.

Referenced by SCIPmessagePrintErrorHeader(), and SCIPmessageVPrintError().

◆ messagePrintWarning()

static void messagePrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  msg 
)
static

prints warning message with the current message handler, or buffers the message if no newline exists

Parameters
messagehdlrmessage handler
msgmessage to print; NULL to flush the output buffer

Definition at line 160 of file message.c.

References handleMessage(), SCIP_Messagehdlr::logfile, SCIP_Messagehdlr::quiet, SCIP_Messagehdlr::warningbuffer, and SCIP_Messagehdlr::warningbufferlen.

Referenced by messagehdlrFree(), SCIPmessagehdlrSetQuiet(), and SCIPmessageVFPrintWarning().

◆ messagePrintDialog()

static void messagePrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  msg 
)
static

prints dialog message with the current message handler, or buffers the message if no newline exists

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
msgmessage to print; NULL to flush the output buffer

Definition at line 174 of file message.c.

References SCIP_Messagehdlr::dialogbuffer, SCIP_Messagehdlr::dialogbufferlen, handleMessage(), SCIP_Messagehdlr::logfile, SCIP_Messagehdlr::quiet, and TRUE.

Referenced by messagehdlrFree(), SCIPmessagehdlrSetQuiet(), and SCIPmessageVFPrintDialog().

◆ messagePrintInfo()

static void messagePrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  msg 
)
static

prints info message with the current message handler, or buffers the message if no newline exists

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
msgmessage to print; NULL to flush the output buffer

Definition at line 200 of file message.c.

References handleMessage(), SCIP_Messagehdlr::infobuffer, SCIP_Messagehdlr::infobufferlen, SCIP_Messagehdlr::logfile, SCIP_Messagehdlr::quiet, and TRUE.

Referenced by messagehdlrFree(), SCIPmessagehdlrSetQuiet(), SCIPmessageVFPrintInfo(), and SCIPmessageVFPrintVerbInfo().

◆ messagehdlrOpenLogfile()

static void messagehdlrOpenLogfile ( SCIP_MESSAGEHDLR messagehdlr,
const char *  filename 
)
static

if the given file is not NULL a log file is opened

Parameters
messagehdlrmessage handler
filenamename of log file, or NULL (stdout)

Definition at line 226 of file message.c.

References SCIP_Messagehdlr::logfile, and SCIPerrorMessage.

Referenced by SCIPmessagehdlrCreate(), and SCIPmessagehdlrSetLogfile().

◆ messagehdlrFree()

static SCIP_RETCODE messagehdlrFree ( SCIP_MESSAGEHDLR **  messagehdlr)
static

frees message handler

Parameters
messagehdlrpointer to the message handler

Definition at line 246 of file message.c.

References BMSfreeMemory, BMSfreeMemoryArrayNull, messagePrintDialog(), messagePrintInfo(), messagePrintWarning(), SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPcreateObjMessagehdlr(), and SCIPmessagehdlrRelease().

◆ SCIPmessagehdlrCreate()

SCIP_RETCODE SCIPmessagehdlrCreate ( SCIP_MESSAGEHDLR **  messagehdlr,
SCIP_Bool  bufferedoutput,
const char *  filename,
SCIP_Bool  quiet,
SCIP_DECL_MESSAGEWARNING((*messagewarning))  ,
SCIP_DECL_MESSAGEDIALOG((*messagedialog))  ,
SCIP_DECL_MESSAGEINFO((*messageinfo))  ,
SCIP_DECL_MESSAGEHDLRFREE((*messagehdlrfree))  ,
SCIP_MESSAGEHDLRDATA messagehdlrdata 
)

Creates and captures a message handler which deals with warning, information, and dialog (interactive shell) methods.

Note
The message handler does not handle error messages; see SCIPmessageSetErrorPrinting()
Parameters
messagehdlrpointer to store the message handler
bufferedoutputshould the output be buffered up to the next newline?
filenamename of log file, or NULL for no log
quietshould screen messages be suppressed?
messagehdlrdatamessage handler data

Definition at line 285 of file message.c.

References BMSallocMemory, BMSallocMemoryArray, messagehdlrOpenLogfile(), SCIP_ALLOC, SCIP_MAXSTRLEN, and SCIP_OKAY.

Referenced by SCIPcreateMessagehdlrDefault(), and SCIPcreateObjMessagehdlr().

◆ SCIPmessagehdlrCapture()

void SCIPmessagehdlrCapture ( SCIP_MESSAGEHDLR messagehdlr)

captures message handler

Parameters
messagehdlrmessage handler, or NULL

Definition at line 329 of file message.c.

References SCIP_Messagehdlr::nuses.

Referenced by SCIPsetMessagehdlr().

◆ SCIPmessagehdlrRelease()

SCIP_RETCODE SCIPmessagehdlrRelease ( SCIP_MESSAGEHDLR **  messagehdlr)

releases message handler

Parameters
messagehdlrpointer to the message handler

Definition at line 338 of file message.c.

References messagehdlrFree(), SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPfree(), and SCIPsetMessagehdlr().

◆ SCIPmessagehdlrSetData()

SCIP_RETCODE SCIPmessagehdlrSetData ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_MESSAGEHDLRDATA messagehdlrdata 
)

sets the user data of the message handler

Parameters
messagehdlrmessage handler; must not be NULL
messagehdlrdatanew message handler data to attach to the handler

Definition at line 367 of file message.c.

References SCIP_Messagehdlr::messagehdlrdata, SCIP_INVALIDDATA, and SCIP_OKAY.

Referenced by SCIP_DECL_MESSAGEHDLRFREE().

◆ SCIPmessagehdlrSetLogfile()

void SCIPmessagehdlrSetLogfile ( SCIP_MESSAGEHDLR messagehdlr,
const char *  filename 
)

sets the log file name for the message handler

Parameters
messagehdlrmessage handler
filenamelog file name where to copy messages into, or NULL

Definition at line 383 of file message.c.

References SCIP_Messagehdlr::logfile, and messagehdlrOpenLogfile().

Referenced by SCIPsetMessagehdlrLogfile().

◆ SCIPmessagehdlrSetQuiet()

void SCIPmessagehdlrSetQuiet ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_Bool  quiet 
)

sets the messages handler to be quiet

Parameters
messagehdlrmessage handler
quietshould screen messages be suppressed?

Definition at line 401 of file message.c.

References messagePrintDialog(), messagePrintInfo(), messagePrintWarning(), and SCIP_Messagehdlr::quiet.

Referenced by SCIPparamsetWrite(), SCIPprintMIPStart(), SCIPprintSol(), and SCIPsetMessagehdlrQuiet().

◆ SCIPmessagePrintWarning()

◆ SCIPmessageVPrintWarning()

void SCIPmessageVPrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a warning message, acting like the vprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list

Definition at line 431 of file message.c.

References SCIPmessageVFPrintWarning().

◆ SCIPmessageFPrintWarning()

void SCIPmessageFPrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)

prints a warning message, acting like the fprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function

Definition at line 441 of file message.c.

References SCIPmessageVFPrintWarning().

Referenced by SCIPprobFree().

◆ SCIPmessageVFPrintWarning()

void SCIPmessageVFPrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a warning message, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list

Definition at line 455 of file message.c.

References BMSallocMemorySize, BMSfreeMemory, messagePrintWarning(), SCIP_MAXSTRLEN, and va_copy.

Referenced by SCIPmessageFPrintWarning(), SCIPmessagePrintWarning(), SCIPmessageVPrintWarning(), and SCIPwarningMessage().

◆ SCIPmessagePrintDialog()

void SCIPmessagePrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)

prints a dialog message that requests user interaction, acting like the printf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function

Definition at line 500 of file message.c.

References SCIPmessageVFPrintDialog().

◆ SCIPmessageVPrintDialog()

void SCIPmessageVPrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a dialog message that requests user interaction, acting like the vprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list

Definition at line 514 of file message.c.

References SCIPmessageVFPrintDialog().

◆ SCIPmessageFPrintDialog()

void SCIPmessageFPrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
  ... 
)

prints a dialog message that requests user interaction into a file, acting like the fprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function

Definition at line 524 of file message.c.

References SCIPmessageVFPrintDialog().

◆ SCIPmessageVFPrintDialog()

void SCIPmessageVFPrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
va_list  ap 
)

prints a dialog message that requests user interaction into a file, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
apvariable argument list

Definition at line 539 of file message.c.

References BMSallocMemorySize, BMSfreeMemory, messagePrintDialog(), SCIP_MAXSTRLEN, and va_copy.

Referenced by SCIPdialogMessage(), SCIPmessageFPrintDialog(), SCIPmessagePrintDialog(), and SCIPmessageVPrintDialog().

◆ SCIPmessagePrintInfo()

void SCIPmessagePrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)

◆ SCIPmessageVPrintInfo()

void SCIPmessageVPrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a message, acting like the vprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list

Definition at line 598 of file message.c.

References SCIPmessageVFPrintInfo().

Referenced by SCIP_NlpiProblem::SCIP_NlpiProblem().

◆ SCIPmessageFPrintInfo()

void SCIPmessageFPrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
  ... 
)

prints a message into a file, acting like the fprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function

Definition at line 608 of file message.c.

References SCIPmessageVFPrintInfo().

Referenced by exprgraphPrintNodeDot(), exprgraphPrintNodeExpression(), paramWrite(), printBounds(), printDualSol(), printFunction(), printHolelist(), printTime(), SCIP_DECL_DIALOGEXEC(), SCIPaggrRowPrint(), SCIPcolPrint(), SCIPconsPrint(), SCIPdigraphPrint(), SCIPdigraphPrintComponents(), SCIPdispLongint(), SCIPdispPrintLine(), SCIPdispTime(), SCIPexprgraphPrintDot(), SCIPexprPrint(), SCIPisDualSolAvailable(), SCIPlpWriteMip(), SCIPnlpiOraclePrintProblem(), SCIPnlpiOraclePrintProblemGams(), SCIPnlpWrite(), SCIPnlrowPrint(), SCIPparamsetSetToSubscipsOff(), SCIPparamsetWrite(), SCIPprintBestSol(), SCIPprintBestTransSol(), SCIPprintBranchingStatistics(), SCIPprintBranchruleStatistics(), SCIPprintBuildOptions(), SCIPprintCompressionStatistics(), SCIPprintConcsolverStatistics(), SCIPprintConflictStatistics(), SCIPprintConstraintStatistics(), SCIPprintConstraintTimingStatistics(), SCIPprintDebugMessage(), SCIPprintExternalCodes(), SCIPprintHeuristicStatistics(), SCIPprintLPSolutionQuality(), SCIPprintLPStatistics(), SCIPprintMIPStart(), SCIPprintNLPStatistics(), SCIPprintNodeRootPath(), SCIPprintOrigProblemStatistics(), SCIPprintPresolverStatistics(), SCIPprintPricerStatistics(), SCIPprintPropagatorStatistics(), SCIPprintReal(), SCIPprintRelaxatorStatistics(), SCIPprintReoptStatistics(), SCIPprintRootStatistics(), SCIPprintSeparatorStatistics(), SCIPprintSol(), SCIPprintSolutionStatistics(), SCIPprintStage(), SCIPprintStatus(), SCIPprintStatusStatistics(), SCIPprintTimingStatistics(), SCIPprintTransProblemStatistics(), SCIPprintTransSol(), SCIPprintTreeStatistics(), SCIPprintVersion(), SCIPprobPrintStatistics(), SCIPprofilePrint(), SCIPretcodePrint(), SCIProwPrint(), SCIPsetIsSumRelGT(), SCIPsolPrint(), SCIPsolPrintRay(), SCIPvarPrint(), SCIPvisualCutoffNode(), SCIPvisualFoundSolution(), SCIPvisualInit(), SCIPvisualLowerbound(), SCIPvisualNewChild(), SCIPvisualSolvedNode(), SCIPvisualUpdateChild(), SCIPvisualUpperbound(), SCIPwriteBnd(), and vbcSetColor().

◆ SCIPmessageVFPrintInfo()

void SCIPmessageVFPrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
va_list  ap 
)

prints a message into a file, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
apvariable argument list

Definition at line 623 of file message.c.

References BMSallocMemorySize, BMSfreeMemory, messagePrintInfo(), SCIP_MAXSTRLEN, and va_copy.

Referenced by lpNumericalTroubleMessage(), SCIPdebugMessagePrint(), SCIPinfoMessage(), SCIPmessageFPrintInfo(), SCIPmessagePrintInfo(), SCIPmessageVPrintInfo(), SCIPprintDebugMessage(), and SCIPsetIsSumRelGT().

◆ SCIPmessagePrintVerbInfo()

void SCIPmessagePrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
const char *  formatstr,
  ... 
)

prints a message depending on the verbosity level, acting like the printf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
formatstrformat string like in printf() function

Definition at line 668 of file message.c.

References SCIPmessageVFPrintVerbInfo().

Referenced by compressReoptTree(), enforceConstraints(), exitPresolve(), focusnodeToFork(), lpSolve(), presolve(), presolveRound(), priceAndCutLoop(), propAndSolve(), SCIPlpCreate(), SCIPlpEndDive(), SCIPlpSolveAndEval(), SCIPpermuteProb(), SCIPpresolve(), SCIPreadProb(), SCIPsolve(), SCIPsolveCIP(), SCIPstatUpdateMemsaveMode(), SCIPtransformProb(), SCIPtreeEndProbing(), SCIPtreeSetNodesel(), SCIPvisualExit(), SCIPvisualInit(), and solveNode().

◆ SCIPmessageVPrintVerbInfo()

void SCIPmessageVPrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
const char *  formatstr,
va_list  ap 
)

prints a message depending on the verbosity level, acting like the vprintf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
formatstrformat string like in printf() function
apvariable argument list

Definition at line 684 of file message.c.

References SCIPmessageVFPrintVerbInfo().

◆ SCIPmessageFPrintVerbInfo()

void SCIPmessageFPrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
FILE *  file,
const char *  formatstr,
  ... 
)

prints a message into a file depending on the verbosity level, acting like the fprintf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function

Definition at line 696 of file message.c.

References SCIPmessageVFPrintVerbInfo().

◆ SCIPmessageVFPrintVerbInfo()

void SCIPmessageVFPrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
FILE *  file,
const char *  formatstr,
va_list  ap 
)

prints a message into a file depending on the verbosity level, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
apvariable argument list

Definition at line 713 of file message.c.

References BMSallocMemorySize, BMSfreeMemory, messagePrintInfo(), SCIP_MAXSTRLEN, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_NONE, and va_copy.

Referenced by SCIPmessageFPrintVerbInfo(), SCIPmessagePrintVerbInfo(), SCIPmessageVPrintVerbInfo(), and SCIPverbMessage().

◆ SCIPmessagePrintErrorHeader()

void SCIPmessagePrintErrorHeader ( const char *  sourcefile,
int  sourceline 
)

prints the header with source file location for an error message using the static message handler

Parameters
sourcefilename of the source file that called the function
sourcelineline in the source file where the function was called

Definition at line 767 of file message.c.

References messagePrintError(), and SCIP_MAXSTRLEN.

◆ SCIPmessagePrintError()

void SCIPmessagePrintError ( const char *  formatstr,
  ... 
)

prints a error message, acting like the printf() command

Parameters
formatstrformat string like in printf() function

Definition at line 781 of file message.c.

References SCIPmessageVPrintError().

Referenced by SCIP_NlpiProblem::SCIP_NlpiProblem(), SCIPconshdlrCreate(), SCIPconshdlrSetPresol(), SCIPpresolCreate(), SCIPprintError(), SCIPprintSysError(), SCIPpropCreate(), SCIPpropSetPresol(), and SCIPretcodePrintError().

◆ SCIPmessageVPrintError()

void SCIPmessageVPrintError ( const char *  formatstr,
va_list  ap 
)

prints an error message, acting like the vprintf() command using the static message handler

Parameters
formatstrformat string like in printf() function
apvariable argument list

Definition at line 794 of file message.c.

References BMSallocMemorySize, BMSfreeMemory, messagePrintError(), SCIP_MAXSTRLEN, and va_copy.

Referenced by SCIP_NlpiProblem::SCIP_NlpiProblem(), and SCIPmessagePrintError().

◆ SCIPmessageSetErrorPrinting()

void SCIPmessageSetErrorPrinting ( SCIP_DECL_ERRORPRINTING((*errorPrinting))  ,
void *  data 
)

Method to set the error printing method. Setting the error printing method to NULL will suspend all error methods.

Note
The error printing method is static variable. That means all occurring errors are handled via that methods
Parameters
datadata pointer which will be passed to the error printing method, or NULL

Definition at line 841 of file message.c.

Referenced by SCIPsetStaticErrorPrintingMessagehdlr().

◆ SCIPmessageSetErrorPrintingDefault()

void SCIPmessageSetErrorPrintingDefault ( void  )

Method to set the error printing method to default version prints everything the stderr.

Note
The error printing method is a static variable. This means that all occurring errors are handled via this method.

Definition at line 854 of file message.c.

◆ SCIPmessagehdlrGetData()

SCIP_MESSAGEHDLRDATA* SCIPmessagehdlrGetData ( SCIP_MESSAGEHDLR messagehdlr)

returns the user data of the message handler

Parameters
messagehdlrmessage handler

Definition at line 877 of file message.c.

References SCIP_Messagehdlr::messagehdlrdata.

Referenced by SCIP_DECL_MESSAGEDIALOG(), SCIP_DECL_MESSAGEHDLRFREE(), SCIP_DECL_MESSAGEINFO(), SCIP_DECL_MESSAGEWARNING(), and SCIPgetObjMessagehdlr().

◆ SCIPmessagehdlrGetLogfile()

FILE* SCIPmessagehdlrGetLogfile ( SCIP_MESSAGEHDLR messagehdlr)

returns the log file or NULL for stdout

Parameters
messagehdlrmessage handler

Definition at line 889 of file message.c.

References SCIP_Messagehdlr::logfile.

◆ SCIPmessagehdlrIsQuiet()

SCIP_Bool SCIPmessagehdlrIsQuiet ( SCIP_MESSAGEHDLR messagehdlr)

returns TRUE if the message handler is set to be quiet

Parameters
messagehdlrmessage handler

Definition at line 900 of file message.c.

References SCIP_Messagehdlr::quiet.

Referenced by doCopy(), SCIPparamsetWrite(), SCIPprintMIPStart(), and SCIPprintSol().

Variable Documentation

◆ staticErrorPrintingData

void* staticErrorPrintingData = NULL
static

static variable which holds a data pointer for the error prinint callback

Definition at line 145 of file message.c.