Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::internal::ScopedSCIPMessageHandlerDisabler Class Reference

#include <gscip_message_handler.h>

Public Member Functions

 ScopedSCIPMessageHandlerDisabler (const MessageHandlerPtr &handler)
 
 ~ScopedSCIPMessageHandlerDisabler ()
 

Detailed Description

Object to be instantiated on stack that, when destroyed, will disable the custom handler so that it does not call the GScipMessageHandler.

It is used so that the GScipMessageHandler is not called after GScip::Solve() have returned, even if the handler has not been uninstalled and freed properly (when an error occurs).

Definition at line 71 of file gscip_message_handler.h.

Constructor & Destructor Documentation

◆ ScopedSCIPMessageHandlerDisabler()

operations_research::internal::ScopedSCIPMessageHandlerDisabler::ScopedSCIPMessageHandlerDisabler ( const MessageHandlerPtr & handler)
explicit

The input handler must be the result of MakeSCIPMessageHandler(). If nullptr (initially or after being reset to null), nothing will happen.

A reference is kept to the input so the caller must make sure this input MessageHandlerPtr will outlive this object.

Definition at line 146 of file gscip_message_handler.cc.

◆ ~ScopedSCIPMessageHandlerDisabler()

operations_research::internal::ScopedSCIPMessageHandlerDisabler::~ScopedSCIPMessageHandlerDisabler ( )
Note
SCIPmessagehdlrGetData is a macro in optimized builds and a function in debug ones. Hence here we assign the result to a variable instead of chaining the calls.

Definition at line 150 of file gscip_message_handler.cc.


The documentation for this class was generated from the following files: