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-2018 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 email to scip@zib.de. */
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 */
43 extern
45  SCIP_DIALOG* dialog, /**< dialog */
46  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
47  );
48 
49 /** creates a dialog handler */
50 extern
52  SCIP_SET* set, /**< global SCIP settings */
53  SCIP_DIALOGHDLR** dialoghdlr /**< pointer to store dialog handler */
54  );
55 
56 /** frees a dialog handler and it's dialog tree */
57 extern
59  SCIP* scip, /**< SCIP data structure */
60  SCIP_DIALOGHDLR** dialoghdlr /**< pointer to dialog handler */
61  );
62 
63 /** executes the root dialog of the dialog handler */
64 extern
66  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
67  SCIP_SET* set /**< global SCIP settings */
68  );
69 
70 /** makes given dialog the root dialog of dialog handler; captures dialog and releases former root dialog */
71 extern
73  SCIP* scip, /**< SCIP data structure */
74  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
75  SCIP_DIALOG* dialog /**< dialog to be the root */
76  );
77 
78 
79 
80 
81 /*
82  * dialog
83  */
84 
85 /** creates and captures a user interface dialog */
86 extern
88  SCIP_DIALOG** dialog, /**< pointer to store the dialog */
89  SCIP_DECL_DIALOGCOPY ((*dialogcopy)), /**< copy method of dialog or NULL if you don't want to copy your plugin into sub-SCIPs */
90  SCIP_DECL_DIALOGEXEC ((*dialogexec)), /**< execution method of dialog */
91  SCIP_DECL_DIALOGDESC ((*dialogdesc)), /**< description output method of dialog, or NULL */
92  SCIP_DECL_DIALOGFREE ((*dialogfree)), /**< destructor of dialog to free user data, or NULL */
93  const char* name, /**< name of dialog: command name appearing in parent's dialog menu */
94  const char* desc, /**< description of dialog used if description output method is NULL */
95  SCIP_Bool issubmenu, /**< is the dialog a sub-menu? */
96  SCIP_DIALOGDATA* dialogdata /**< user defined dialog data */
97  );
98 
99 /** captures a dialog */
100 extern
101 void SCIPdialogCapture(
102  SCIP_DIALOG* dialog /**< dialog */
103  );
104 
105 /** releases a dialog */
106 extern
108  SCIP* scip, /**< SCIP data structure */
109  SCIP_DIALOG** dialog /**< pointer to dialog */
110  );
111 
112 /** executes dialog */
113 extern
115  SCIP_DIALOG* dialog, /**< dialog */
116  SCIP_SET* set, /**< global SCIP settings */
117  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
118  SCIP_DIALOG** nextdialog /**< pointer to store the next dialog to process */
119  );
120 
121 /** adds a sub-dialog to the given dialog as menu entry and captures the sub-dialog */
122 extern
124  SCIP_DIALOG* dialog, /**< dialog */
125  SCIP_SET* set, /**< global SCIP settings */
126  SCIP_DIALOG* subdialog /**< sub-dialog to add as menu entry in dialog */
127  );
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif
SCIP_RETCODE SCIPdialogExec(SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
Definition: dialog.c:932
#define SCIP_DECL_DIALOGCOPY(x)
Definition: type_dialog.h:53
SCIP_RETCODE SCIPdialogRelease(SCIP *scip, SCIP_DIALOG **dialog)
Definition: dialog.c:915
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
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:328
#define SCIP_DECL_DIALOGDESC(x)
Definition: type_dialog.h:73
void SCIPdialogCapture(SCIP_DIALOG *dialog)
Definition: dialog.c:905
SCIP_RETCODE SCIPdialogCopyInclude(SCIP_DIALOG *dialog, SCIP_SET *set)
Definition: dialog.c:310
#define SCIP_Bool
Definition: def.h:61
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:817
#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:957
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