Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SCIP 9.2.0
SCIP 8.1.0
SCIP 7.0.3
SCIP 6.0.2
SCIP 5.0.1
SCIP 4.0.1
SCIP 3.2.1
SCIP
Solving Constraint Integer Programs
Overview
Files
Plugin Types
Interfaces
Examples
How To
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
scip-repo
src
scip
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-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 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
37
SCIP_RETCODE
SCIPinterruptCreate
(
38
SCIP_INTERRUPT
** interrupt
/**< pointer to store the CTRL-C interrupt data */
39
);
40
41
/** frees a CTRL-C interrupt data */
42
extern
43
void
SCIPinterruptFree
(
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
49
void
SCIPinterruptCapture
(
50
SCIP_INTERRUPT
* interrupt
/**< CTRL-C interrupt data */
51
);
52
53
/** releases the CTRL-C interrupt and restores the old interrupt handler */
54
extern
55
void
SCIPinterruptRelease
(
56
SCIP_INTERRUPT
* interrupt
/**< CTRL-C interrupt data */
57
);
58
59
/** returns whether the user interrupted by pressing CTRL-C */
60
extern
61
SCIP_Bool
SCIPinterrupted
(
62
void
63
);
64
65
#ifdef __cplusplus
66
}
67
#endif
68
69
#endif
70