Detailed Description
C++ wrapper for event handlers.
Definition in file objeventhdlr.h.
Go to the source code of this file.
Data Structures | |
class | scip::ObjEventhdlr |
C++ wrapper for event handlers. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_RETCODE | SCIPincludeObjEventhdlr (SCIP *scip, scip::ObjEventhdlr *objeventhdlr, SCIP_Bool deleteobject) |
scip::ObjEventhdlr * | SCIPfindObjEventhdlr (SCIP *scip, const char *name) |
scip::ObjEventhdlr * | SCIPgetObjEventhdlr (SCIP *scip, SCIP_EVENTHDLR *eventhdlr) |
Function Documentation
◆ SCIPincludeObjEventhdlr()
SCIP_RETCODE SCIPincludeObjEventhdlr | ( | SCIP * | scip, |
scip::ObjEventhdlr * | objeventhdlr, | ||
SCIP_Bool | deleteobject | ||
) |
creates the event handler for the given event handler object and includes it in SCIP
The method should be called in one of the following ways:
- The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyEventhdlr* myeventhdlr = new MyEventhdlr(...); SCIP_CALL( SCIPincludeObjEventhdlr(scip, &myeventhdlr, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myeventhdlr; // delete eventhdlr AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjEventhdlr(scip, new MyEventhdlr(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyEventhdlr is called here
creates the event handler for the given event handler object and includes it in SCIP
- Parameters
-
scip SCIP data structure objeventhdlr event handler object deleteobject should the event handler object be deleted when eventhdlristic is freed?
Definition at line 221 of file objeventhdlr.cpp.
References NULL, SCIP_CALL, scip::ObjEventhdlr::scip_desc_, scip::ObjEventhdlr::scip_name_, SCIP_OKAY, and SCIPincludeEventhdlr().
Referenced by runSCIP(), SCIP_DECL_EVENTCOPY(), and scip::ObjEventhdlr::SCIP_DECL_EVENTDELETE().
◆ SCIPfindObjEventhdlr()
scip::ObjEventhdlr* SCIPfindObjEventhdlr | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the eventhdlr object of the given name, or 0 if not existing
- Parameters
-
scip SCIP data structure name name of event handler
Definition at line 248 of file objeventhdlr.cpp.
References NULL, SCIPeventhdlrGetData(), and SCIPfindEventhdlr().
Referenced by scip::ObjEventhdlr::SCIP_DECL_EVENTDELETE().
◆ SCIPgetObjEventhdlr()
scip::ObjEventhdlr* SCIPgetObjEventhdlr | ( | SCIP * | scip, |
SCIP_EVENTHDLR * | eventhdlr | ||
) |
returns the eventhdlr object for the given event handler
- Parameters
-
scip SCIP data structure eventhdlr event handler
Definition at line 267 of file objeventhdlr.cpp.
References NULL, and SCIPeventhdlrGetData().
Referenced by scip::ObjEventhdlr::SCIP_DECL_EVENTDELETE().