Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <iosfwd>
7 :
8 : #include "DataStructures/DataBox/Tag.hpp"
9 :
10 : namespace Parallel {
11 :
12 : /*!
13 : * \brief Exit code of an executable
14 : *
15 : * \warning Don't change the integer values of the enum cases unless you have a
16 : * very good reason to do so. The integer values are used by external code, so
17 : * this is a public interface that should remain stable.
18 : */
19 1 : enum class ExitCode : int {
20 : /// Program is complete
21 : Complete = 0,
22 : /// Program aborted because of an error
23 : Abort = 1,
24 : /// Program is incomplete and should be continued from the last checkpoint
25 : ContinueFromCheckpoint = 2
26 : };
27 :
28 0 : std::ostream& operator<<(std::ostream& os, const ExitCode& code);
29 :
30 : namespace Tags {
31 :
32 : /*!
33 : * \brief Exit code of an executable
34 : *
35 : * \see Parallel::ExitCode
36 : */
37 1 : struct ExitCode : db::SimpleTag {
38 0 : using type = Parallel::ExitCode;
39 : };
40 :
41 : } // namespace Tags
42 : } // namespace Parallel
|