Scippy

SCIP

Solving Constraint Integer Programs

interrupt.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 interrupt.h
17  * @ingroup INTERNALAPI
18  * @brief methods for catching the user CTRL-C interrupt
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_INTERRUPT_H__
25 #define __SCIP_INTERRUPT_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_interrupt.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /** creates a CTRL-C interrupt data */
37 extern
39  SCIP_INTERRUPT** interrupt /**< pointer to store the CTRL-C interrupt data */
40  );
41 
42 /** frees a CTRL-C interrupt data */
43 extern
45  SCIP_INTERRUPT** interrupt /**< pointer to the CTRL-C interrupt data */
46  );
47 
48 /** captures the CTRL-C interrupt to call the SCIP's own interrupt handler */
49 extern
51  SCIP_INTERRUPT* interrupt /**< CTRL-C interrupt data */
52  );
53 
54 /** releases the CTRL-C interrupt and restores the old interrupt handler */
55 extern
57  SCIP_INTERRUPT* interrupt /**< CTRL-C interrupt data */
58  );
59 
60 /** returns whether the user interrupted by pressing CTRL-C */
61 extern
63  void
64  );
65 
66 /** resets the number of interrupts to 0 */
67 extern
69  void
70  );
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif
SCIP_RETCODE SCIPinterruptCreate(SCIP_INTERRUPT **interrupt)
Definition: interrupt.c:76
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
void SCIPresetInterrupted(void)
Definition: interrupt.c:155
void SCIPinterruptRelease(SCIP_INTERRUPT *interrupt)
Definition: interrupt.c:128
#define SCIP_Bool
Definition: def.h:61
SCIP_Bool SCIPinterrupted(void)
Definition: interrupt.c:147
void SCIPinterruptFree(SCIP_INTERRUPT **interrupt)
Definition: interrupt.c:89
common defines and data types used in all packages of SCIP
void SCIPinterruptCapture(SCIP_INTERRUPT *interrupt)
Definition: interrupt.c:99
type definitions for catching the user CTRL-C interrupt