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-2016 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  * @brief internal methods for user interface dialog
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_DIALOG_H__
24 #define __SCIP_DIALOG_H__
25 
26 
27 #include "scip/def.h"
28 #include "scip/type_retcode.h"
29 #include "scip/type_set.h"
30 #include "scip/type_dialog.h"
31 #include "scip/pub_dialog.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * dialog handler
39  */
40 
41 /** copies the given dialog to a new scip */
42 extern
44  SCIP_DIALOG* dialog, /**< dialog */
45  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
46  );
47 
48 /** creates a dialog handler */
49 extern
51  SCIP_SET* set, /**< global SCIP settings */
52  SCIP_DIALOGHDLR** dialoghdlr /**< pointer to store dialog handler */
53  );
54 
55 /** frees a dialog handler and it's dialog tree */
56 extern
58  SCIP* scip, /**< SCIP data structure */
59  SCIP_DIALOGHDLR** dialoghdlr /**< pointer to dialog handler */
60  );
61 
62 /** executes the root dialog of the dialog handler */
63 extern
65  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
66  SCIP_SET* set /**< global SCIP settings */
67  );
68 
69 /** makes given dialog the root dialog of dialog handler; captures dialog and releases former root dialog */
70 extern
72  SCIP* scip, /**< SCIP data structure */
73  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
74  SCIP_DIALOG* dialog /**< dialog to be the root */
75  );
76 
77 
78 
79 
80 /*
81  * dialog
82  */
83 
84 /** creates and captures a user interface dialog */
85 extern
87  SCIP_DIALOG** dialog, /**< pointer to store the dialog */
88  SCIP_DECL_DIALOGCOPY ((*dialogcopy)), /**< copy method of dialog or NULL if you don't want to copy your plugin into sub-SCIPs */
89  SCIP_DECL_DIALOGEXEC ((*dialogexec)), /**< execution method of dialog */
90  SCIP_DECL_DIALOGDESC ((*dialogdesc)), /**< description output method of dialog, or NULL */
91  SCIP_DECL_DIALOGFREE ((*dialogfree)), /**< destructor of dialog to free user data, or NULL */
92  const char* name, /**< name of dialog: command name appearing in parent's dialog menu */
93  const char* desc, /**< description of dialog used if description output method is NULL */
94  SCIP_Bool issubmenu, /**< is the dialog a sub-menu? */
95  SCIP_DIALOGDATA* dialogdata /**< user defined dialog data */
96  );
97 
98 /** captures a dialog */
99 extern
100 void SCIPdialogCapture(
101  SCIP_DIALOG* dialog /**< dialog */
102  );
103 
104 /** releases a dialog */
105 extern
107  SCIP* scip, /**< SCIP data structure */
108  SCIP_DIALOG** dialog /**< pointer to dialog */
109  );
110 
111 /** executes dialog */
112 extern
114  SCIP_DIALOG* dialog, /**< dialog */
115  SCIP_SET* set, /**< global SCIP settings */
116  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
117  SCIP_DIALOG** nextdialog /**< pointer to store the next dialog to process */
118  );
119 
120 /** adds a sub-dialog to the given dialog as menu entry and captures the sub-dialog */
121 extern
123  SCIP_DIALOG* dialog, /**< dialog */
124  SCIP_SET* set, /**< global SCIP settings */
125  SCIP_DIALOG* subdialog /**< sub-dialog to add as menu entry in dialog */
126  );
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif
SCIP_RETCODE SCIPdialogExec(SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
Definition: dialog.c:914
#define SCIP_DECL_DIALOGCOPY(x)
Definition: type_dialog.h:53
SCIP_RETCODE SCIPdialogRelease(SCIP *scip, SCIP_DIALOG **dialog)
Definition: dialog.c:897
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:887
SCIP_RETCODE SCIPdialogCopyInclude(SCIP_DIALOG *dialog, SCIP_SET *set)
Definition: dialog.c:310
#define SCIP_Bool
Definition: def.h:53
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:810
#define SCIP_DECL_DIALOGFREE(x)
Definition: type_dialog.h:61
SCIP_RETCODE SCIPdialoghdlrSetRoot(SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
Definition: dialog.c:402
#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:939
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:374