Scippy

SCIP

Solving Constraint Integer Programs

dialog.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file dialog.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for user interface dialog
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_DIALOG_H__
25 #define __SCIP_DIALOG_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_set.h"
31 #include "scip/type_dialog.h"
32 #include "scip/pub_dialog.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * dialog handler
40  */
41 
42 /** copies the given dialog to a new scip */
44  SCIP_DIALOG* dialog, /**< dialog */
45  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
46  );
47 
48 /** creates a dialog handler */
50  SCIP_SET* set, /**< global SCIP settings */
51  SCIP_DIALOGHDLR** dialoghdlr /**< pointer to store dialog handler */
52  );
53 
54 /** frees a dialog handler and it's dialog tree */
56  SCIP* scip, /**< SCIP data structure */
57  SCIP_DIALOGHDLR** dialoghdlr /**< pointer to dialog handler */
58  );
59 
60 /** executes the root dialog of the dialog handler */
62  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
63  SCIP_SET* set /**< global SCIP settings */
64  );
65 
66 /** makes given dialog the root dialog of dialog handler; captures dialog and releases former root dialog */
68  SCIP* scip, /**< SCIP data structure */
69  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
70  SCIP_DIALOG* dialog /**< dialog to be the root */
71  );
72 
73 
74 
75 
76 /*
77  * dialog
78  */
79 
80 /** creates and captures a user interface dialog */
82  SCIP_DIALOG** dialog, /**< pointer to store the dialog */
83  SCIP_DECL_DIALOGCOPY ((*dialogcopy)), /**< copy method of dialog or NULL if you don't want to copy your plugin into sub-SCIPs */
84  SCIP_DECL_DIALOGEXEC ((*dialogexec)), /**< execution method of dialog */
85  SCIP_DECL_DIALOGDESC ((*dialogdesc)), /**< description output method of dialog, or NULL */
86  SCIP_DECL_DIALOGFREE ((*dialogfree)), /**< destructor of dialog to free user data, or NULL */
87  const char* name, /**< name of dialog: command name appearing in parent's dialog menu */
88  const char* desc, /**< description of dialog used if description output method is NULL */
89  SCIP_Bool issubmenu, /**< is the dialog a sub-menu? */
90  SCIP_DIALOGDATA* dialogdata /**< user defined dialog data */
91  );
92 
93 /** captures a dialog */
95  SCIP_DIALOG* dialog /**< dialog */
96  );
97 
98 /** releases a dialog */
100  SCIP* scip, /**< SCIP data structure */
101  SCIP_DIALOG** dialog /**< pointer to dialog */
102  );
103 
104 /** executes dialog */
106  SCIP_DIALOG* dialog, /**< dialog */
107  SCIP_SET* set, /**< global SCIP settings */
108  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
109  SCIP_DIALOG** nextdialog /**< pointer to store the next dialog to process */
110  );
111 
112 /** adds a sub-dialog to the given dialog as menu entry and captures the sub-dialog */
114  SCIP_DIALOG* dialog, /**< dialog */
115  SCIP_SET* set, /**< global SCIP settings */
116  SCIP_DIALOG* subdialog /**< sub-dialog to add as menu entry in dialog */
117  );
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif
SCIP_RETCODE SCIPdialogExec(SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
Definition: dialog.c:930
#define SCIP_DECL_DIALOGCOPY(x)
Definition: type_dialog.h:53
SCIP_RETCODE SCIPdialogRelease(SCIP *scip, SCIP_DIALOG **dialog)
Definition: dialog.c:913
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for global SCIP settings
struct SCIP_DialogData SCIP_DIALOGDATA
Definition: type_dialog.h:42
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPdialoghdlrCreate(SCIP_SET *set, SCIP_DIALOGHDLR **dialoghdlr)
Definition: dialog.c:327
#define SCIP_DECL_DIALOGDESC(x)
Definition: type_dialog.h:73
void SCIPdialogCapture(SCIP_DIALOG *dialog)
Definition: dialog.c:903
SCIP_RETCODE SCIPdialogCopyInclude(SCIP_DIALOG *dialog, SCIP_SET *set)
Definition: dialog.c:309
#define SCIP_Bool
Definition: def.h:70
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)
Definition: dialog.c:815
#define SCIP_DECL_DIALOGFREE(x)
Definition: type_dialog.h:61
SCIP_RETCODE SCIPdialoghdlrSetRoot(SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
Definition: dialog.c:404
#define SCIP_DECL_DIALOGEXEC(x)
Definition: type_dialog.h:87
SCIP_RETCODE SCIPdialogAddEntry(SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOG *subdialog)
Definition: dialog.c:955
SCIP_RETCODE SCIPdialoghdlrFree(SCIP *scip, SCIP_DIALOGHDLR **dialoghdlr)
Definition: dialog.c:358
type definitions for user interface dialog
common defines and data types used in all packages of SCIP
public methods for user interface dialog
SCIP_RETCODE SCIPdialoghdlrExec(SCIP_DIALOGHDLR *dialoghdlr, SCIP_SET *set)
Definition: dialog.c:376