16#ifndef OR_TOOLS_GSCIP_GSCIP_EVENT_HANDLER_H_
17#define OR_TOOLS_GSCIP_GSCIP_EVENT_HANDLER_H_
23#include "scip/type_event.h"
53 SCIP_EVENTTYPE
event_type()
const {
return event_type_; }
60 const SCIP_EVENTTYPE event_type_;
93 : description_(description) {}
113 virtual SCIP_RETCODE
Init(
GScip* gscip) {
return SCIP_OKAY; }
132 virtual SCIP_RETCODE
Exit(
GScip* gscip) {
return SCIP_OKAY; }
151 SCIP_RETCODE
CatchEvent(SCIP_EVENTTYPE event_type);
155 CaughtEvent(
const SCIP_EVENTTYPE event_type,
const int filter_pos)
156 : event_type(event_type), filter_pos(filter_pos) {}
159 SCIP_EVENTTYPE event_type;
179 const GScipEventHandlerDescription description_;
182 GScip* gscip_ =
nullptr;
185 SCIP_EVENTHDLR* event_handler_ =
nullptr;
188 std::vector<CaughtEvent> caught_events_;
SCIP_EVENTTYPE event_type() const
GScipEventHandlerContext(GScip *gscip, SCIP_EVENTTYPE event_type)
friend SCIP_RETCODE DropAllEvents(GScipEventHandler &handler)
virtual ~GScipEventHandler()=default
virtual SCIP_RETCODE Init(GScip *gscip)
virtual SCIP_RETCODE Execute(GScipEventHandlerContext context)
void Register(GScip *gscip)
virtual SCIP_RETCODE Exit(GScip *gscip)
SCIP_RETCODE CatchEvent(SCIP_EVENTTYPE event_type)
GScipEventHandler(const GScipEventHandlerDescription &description)
GurobiMPCallbackContext * context
Collection of objects used to extend the Constraint Solver library.