Scippy

SCIP

Solving Constraint Integer Programs

struct_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 struct_dialog.h
17  * @ingroup INTERNALAPI
18  * @brief data structures 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_STRUCT_DIALOG_H__
25 #define __SCIP_STRUCT_DIALOG_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_dialog.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** user interface dialog */
37 {
38  SCIP_DECL_DIALOGCOPY ((*dialogcopy)); /**< copy method of dialog or NULL if you don't want to copy your plugin into sub-SCIPs */
39  SCIP_DECL_DIALOGEXEC ((*dialogexec)); /**< execution method of dialog */
40  SCIP_DECL_DIALOGDESC ((*dialogdesc)); /**< description output method of dialog, or NULL */
41  SCIP_DECL_DIALOGFREE ((*dialogfree)); /**< destructor of dialog to free user data, or NULL */
42  char* name; /**< name of dialog: command name appearing in parent's dialog menu */
43  char* desc; /**< description of dialog used if description output method is NULL */
44  SCIP_DIALOG* parent; /**< parent dialog of dialog */
45  SCIP_DIALOG** subdialogs; /**< sub dialogs of dialog */
46  SCIP_DIALOGDATA* dialogdata; /**< user defined dialog data */
47  int nsubdialogs; /**< number of sub dialogs */
48  int subdialogssize; /**< size of subdialogs array */
49  int nuses; /**< number of times, the dialog is used */
50  SCIP_Bool issubmenu; /**< is the dialog a submenu? */
51 };
52 
53 /** linked list of single input lines */
55 {
56  char* inputline; /**< single line of input */
57  SCIP_LINELIST* nextline; /**< next input line */
58 };
59 
60 /** dialog handler */
62 {
63  SCIP_DIALOG* rootdialog; /**< main (root) dialog */
64  SCIP_LINELIST* inputlist; /**< list of input lines that are processed before stdin inputs */
65  SCIP_LINELIST** inputlistptr; /**< pointer to the ending nextline pointer of the list (which points to 0) */
66  char* buffer; /**< command buffer */
67  int buffersize; /**< size of command buffer */
68  int bufferpos; /**< position of first unprocessed character in buffer */
69  int nprotectedhistelems;/**< number of history entries protected from cleaning up */
70 };
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif
SCIP_LINELIST * nextline
Definition: struct_dialog.h:57
struct SCIP_DialogData SCIP_DIALOGDATA
Definition: type_dialog.h:42
char * inputline
Definition: struct_dialog.h:56
SCIP_DIALOG ** subdialogs
Definition: struct_dialog.h:45
SCIP_DECL_DIALOGDESC((*dialogdesc))
SCIP_DIALOG * parent
Definition: struct_dialog.h:44
SCIP_DECL_DIALOGEXEC((*dialogexec))
SCIP_Bool issubmenu
Definition: struct_dialog.h:50
SCIP_LINELIST * inputlist
Definition: struct_dialog.h:64
int subdialogssize
Definition: struct_dialog.h:48
SCIP_DIALOGDATA * dialogdata
Definition: struct_dialog.h:46
#define SCIP_Bool
Definition: def.h:70
SCIP_LINELIST ** inputlistptr
Definition: struct_dialog.h:65
SCIP_DECL_DIALOGCOPY((*dialogcopy))
SCIP_DIALOG * rootdialog
Definition: struct_dialog.h:63
SCIP_DECL_DIALOGFREE((*dialogfree))
type definitions for user interface dialog
common defines and data types used in all packages of SCIP