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