Scippy

SCIP

Solving Constraint Integer Programs

objdialog.h File Reference

Detailed Description

C++ wrapper for dialogs.

Author
Kati Wolter

Definition in file objdialog.h.

#include <cstring>
#include "scip/scip.h"
#include "objscip/objcloneable.h"

Go to the source code of this file.

Data Structures

class  scip::ObjDialog
 C++ wrapper for dialogs. More...
 

Namespaces

 scip
 

Functions

SCIP_RETCODE SCIPincludeObjDialog (SCIP *scip, scip::ObjDialog *objdialog, SCIP_Bool deleteobject)
 

Function Documentation

◆ SCIPincludeObjDialog()

SCIP_RETCODE SCIPincludeObjDialog ( SCIP scip,
scip::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:

  1. The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyDialog* mydialog = new MyDialog(...); SCIP_CALL( SCIPincludeObjDialog(scip, &mydialog, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mydialog; // delete dialog AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjDialog(scip, 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
scipSCIP data structure
objdialogdialog object
deleteobjectshould the dialog object be deleted when dialog is freed?

Definition at line 143 of file objdialog.cpp.

References SCIP_CALL, scip::ObjDialog::scip_desc_, scip::ObjDialog::scip_issubmenu_, scip::ObjDialog::scip_name_, SCIP_OKAY, SCIPaddDialogEntry(), SCIPdialogHasEntry(), SCIPgetRootDialog(), SCIPincludeDialog(), and SCIPreleaseDialog().

Referenced by SCIP_DECL_DIALOGCOPY(), and scip::ObjDialog::SCIP_DECL_DIALOGDESC().