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-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 interrupt.h
17  * @brief methods for catching the user CTRL-C interrupt
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_INTERRUPT_H__
24 #define __SCIP_INTERRUPT_H__
25 
26 
27 #include "scip/def.h"
28 #include "scip/type_retcode.h"
29 #include "scip/type_interrupt.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** creates a CTRL-C interrupt data */
36 extern
38  SCIP_INTERRUPT** interrupt /**< pointer to store the CTRL-C interrupt data */
39  );
40 
41 /** frees a CTRL-C interrupt data */
42 extern
44  SCIP_INTERRUPT** interrupt /**< pointer to the CTRL-C interrupt data */
45  );
46 
47 /** captures the CTRL-C interrupt to call the SCIP's own interrupt handler */
48 extern
50  SCIP_INTERRUPT* interrupt /**< CTRL-C interrupt data */
51  );
52 
53 /** releases the CTRL-C interrupt and restores the old interrupt handler */
54 extern
56  SCIP_INTERRUPT* interrupt /**< CTRL-C interrupt data */
57  );
58 
59 /** returns whether the user interrupted by pressing CTRL-C */
60 extern
62  void
63  );
64 
65 /** resets the number of interrupts to 0 */
66 extern
68  void
69  );
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #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:53
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