Scippy

SCIP

Solving Constraint Integer Programs

dialog.h File Reference

Detailed Description

internal methods for user interface dialog

Author
Tobias Achterberg

Definition in file dialog.h.

#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_set.h"
#include "scip/type_dialog.h"
#include "scip/pub_dialog.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPdialogCopyInclude (SCIP_DIALOG *dialog, SCIP_SET *set)
 
SCIP_RETCODE SCIPdialoghdlrCreate (SCIP_SET *set, SCIP_DIALOGHDLR **dialoghdlr)
 
SCIP_RETCODE SCIPdialoghdlrFree (SCIP *scip, SCIP_DIALOGHDLR **dialoghdlr)
 
SCIP_RETCODE SCIPdialoghdlrExec (SCIP_DIALOGHDLR *dialoghdlr, SCIP_SET *set)
 
SCIP_RETCODE SCIPdialoghdlrSetRoot (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
 
SCIP_RETCODE SCIPdialogCreate (SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)
 
void SCIPdialogCapture (SCIP_DIALOG *dialog)
 
SCIP_RETCODE SCIPdialogRelease (SCIP *scip, SCIP_DIALOG **dialog)
 
SCIP_RETCODE SCIPdialogExec (SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
 
SCIP_RETCODE SCIPdialogAddEntry (SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOG *subdialog)
 

Function Documentation

◆ SCIPdialogCopyInclude()

SCIP_RETCODE SCIPdialogCopyInclude ( SCIP_DIALOG dialog,
SCIP_SET set 
)

copies the given dialog to a new scip

Parameters
dialogdialog
setSCIP_SET of SCIP to copy to

Definition at line 318 of file dialog.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPdialogGetName(), and SCIPsetDebugMsg.

Referenced by SCIPsetEnableOrDisablePluginClocks().

◆ SCIPdialoghdlrCreate()

SCIP_RETCODE SCIPdialoghdlrCreate ( SCIP_SET set,
SCIP_DIALOGHDLR **  dialoghdlr 
)

creates a dialog handler

Parameters
setglobal SCIP settings
dialoghdlrpointer to store dialog handler

Definition at line 336 of file dialog.c.

References BMSallocMemory, BMSallocMemoryArray, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPdialoghdlrClearBuffer(), SCIPsetIncludeExternalCode(), and SCIPsnprintf().

Referenced by doScipCreate().

◆ SCIPdialoghdlrFree()

SCIP_RETCODE SCIPdialoghdlrFree ( SCIP scip,
SCIP_DIALOGHDLR **  dialoghdlr 
)

frees a dialog handler and it's dialog tree

Parameters
scipSCIP data structure
dialoghdlrpointer to dialog handler

Definition at line 367 of file dialog.c.

References BMSfreeMemory, BMSfreeMemoryArray, linelistFreeAll(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPdialoghdlrSetRoot().

Referenced by SCIPfree().

◆ SCIPdialoghdlrExec()

SCIP_RETCODE SCIPdialoghdlrExec ( SCIP_DIALOGHDLR dialoghdlr,
SCIP_SET set 
)

executes the root dialog of the dialog handler

Parameters
dialoghdlrdialog handler
setglobal SCIP settings

Definition at line 385 of file dialog.c.

References SCIP_Dialoghdlr::buffer, SCIP_Dialoghdlr::bufferpos, NULL, SCIP_Dialoghdlr::rootdialog, SCIP_CALL, SCIP_OKAY, SCIPdialogExec(), and SCIPdialoghdlrClearBuffer().

Referenced by SCIPstartInteraction().

◆ SCIPdialoghdlrSetRoot()

SCIP_RETCODE SCIPdialoghdlrSetRoot ( SCIP scip,
SCIP_DIALOGHDLR dialoghdlr,
SCIP_DIALOG dialog 
)

makes given dialog the root dialog of dialog handler; captures dialog and releases former root dialog

Parameters
scipSCIP data structure
dialoghdlrdialog handler
dialogdialog to be the root

Definition at line 413 of file dialog.c.

References NULL, SCIP_Dialoghdlr::rootdialog, SCIP_CALL, SCIP_OKAY, SCIPdialogCapture(), and SCIPdialogRelease().

Referenced by SCIPdialoghdlrFree(), and SCIPsetRootDialog().

◆ SCIPdialogCreate()

SCIP_RETCODE SCIPdialogCreate ( SCIP_DIALOG **  dialog,
SCIP_DECL_DIALOGCOPY((*dialogcopy))  ,
SCIP_DECL_DIALOGEXEC((*dialogexec))  ,
SCIP_DECL_DIALOGDESC((*dialogdesc))  ,
SCIP_DECL_DIALOGFREE((*dialogfree))  ,
const char *  name,
const char *  desc,
SCIP_Bool  issubmenu,
SCIP_DIALOGDATA dialogdata 
)

creates and captures a user interface dialog

Parameters
dialogpointer to store the dialog
namename of dialog: command name appearing in parent's dialog menu
descdescription of dialog used if description output method is NULL
issubmenuis the dialog a sub-menu?
dialogdatauser defined dialog data

Definition at line 824 of file dialog.c.

References BMSallocMemory, BMSduplicateMemoryArray, BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_ALLOC, SCIP_ALLOC_TERMINATE, SCIP_OKAY, and SCIPdialogCapture().

Referenced by SCIPincludeDialog().

◆ SCIPdialogCapture()

void SCIPdialogCapture ( SCIP_DIALOG dialog)

captures a dialog

Parameters
dialogdialog

Definition at line 912 of file dialog.c.

References NULL, and SCIP_Dialog::nuses.

Referenced by SCIPcaptureDialog(), SCIPdialogAddEntry(), SCIPdialogCreate(), and SCIPdialoghdlrSetRoot().

◆ SCIPdialogRelease()

SCIP_RETCODE SCIPdialogRelease ( SCIP scip,
SCIP_DIALOG **  dialog 
)

releases a dialog

Parameters
scipSCIP data structure
dialogpointer to dialog

Definition at line 922 of file dialog.c.

References dialogFree(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by dialogFree(), SCIPdialoghdlrSetRoot(), and SCIPreleaseDialog().

◆ SCIPdialogExec()

SCIP_RETCODE SCIPdialogExec ( SCIP_DIALOG dialog,
SCIP_SET set,
SCIP_DIALOGHDLR dialoghdlr,
SCIP_DIALOG **  nextdialog 
)

executes dialog

Parameters
dialogdialog
setglobal SCIP settings
dialoghdlrdialog handler
nextdialogpointer to store the next dialog to process

Definition at line 939 of file dialog.c.

References NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPdialoghdlrExec().

◆ SCIPdialogAddEntry()

SCIP_RETCODE SCIPdialogAddEntry ( SCIP_DIALOG dialog,
SCIP_SET set,
SCIP_DIALOG subdialog 
)

adds a sub-dialog to the given dialog as menu entry and captures the sub-dialog

Parameters
dialogdialog
setglobal SCIP settings
subdialogsub-dialog to add as menu entry in dialog

Definition at line 964 of file dialog.c.

References ensureSubdialogMem(), SCIP_Dialog::nsubdialogs, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPdialogCapture(), SCIPdialogGetName(), SCIPdialogHasEntry(), SCIPerrorMessage, SCIPsortedvecInsertPtr(), and SCIP_Dialog::subdialogs.

Referenced by SCIPaddDialogEntry().