objdialog.h File Reference
Detailed Description
C++ wrapper for dialogs.
Definition in file objdialog.h.
Go to the source code of this file.
Data Structures | |
| class | gcg::ObjDialog |
| C++ wrapper for dialogs. More... | |
Namespaces | |
| namespace | gcg |
Functions | |
| GCG_EXPORT SCIP_RETCODE | GCGincludeObjDialog (GCG *gcg, SCIP_DIALOG *parentdialog, gcg::ObjDialog *objdialog, SCIP_Bool deleteobject) |
Function Documentation
◆ GCGincludeObjDialog()
| GCG_EXPORT SCIP_RETCODE GCGincludeObjDialog | ( | GCG * | gcg, |
| SCIP_DIALOG * | parentdialog, | ||
| gcg::ObjDialog * | objdialog, | ||
| SCIP_Bool | deleteobject | ||
| ) |
creates the dialog for the given dialog 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) ); ... MyDialog* mydialog = new MyDialog(...); SCIP_CALL( GCGincludeObjDialog(gcg, &mydialog, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mydialog; // delete dialog AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( GCGincludeObjDialog(gcg, new MyDialog(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyDialog is called here
creates the dialog for the given dialog object and includes it in SCIP
- Parameters
-
gcg GCG data structure parentdialog parent dialog objdialog dialog object deleteobject should the dialog object be deleted when dialog is freed?
Definition at line 126 of file objdialog.cpp.
References SCIP_DialogData::deleteobject, dialogCopyObj, GCGgetOrigprob(), SCIP_DialogData::objdialog, SCIP_CALL, gcg::ObjDialog::scip_desc_, gcg::ObjDialog::scip_issubmenu_, gcg::ObjDialog::scip_name_, SCIP_OKAY, SCIPaddDialogEntry(), SCIPdialogHasEntry(), SCIPincludeDialog(), and SCIPreleaseDialog().
Referenced by GCGincludeDialogsGraph(), and GCGincludeGraphEntries().