IMP  2.3.0
The Integrative Modeling Platform
enums.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base/enums.h \brief Basic types used by IMP.
3  *
4  * Copyright 2007-2014 IMP Inventors. All rights reserved.
5  *
6  */
7 
8 #ifndef IMPBASE_ENUMS_H
9 #define IMPBASE_ENUMS_H
10 
11 #include <IMP/base/base_config.h>
12 #include "compiler_macros.h"
13 #include <iostream>
14 
15 // IMPBASE_BEGIN_NAMESPACE
16 namespace IMP {
17 
18 namespace base {
19 //! The log levels supported by \imp
20 enum LogLevel {
21  /** Use to specify that the global log level should be used
22  (eg in IMP::base::Object::set_log_level())*/
23  DEFAULT = -1,
24  /** Do not output any text.*/
25  SILENT = IMP_SILENT,
26  /** Output only warnings.*/
27  WARNING = IMP_SILENT + 1,
28  /** Output only progress meter style displays and occasional printouts
29  when switching phases of work.*/
30  PROGRESS = IMP_PROGRESS,
31  /** Output a line or two per evaluation call.*/
32  TERSE = IMP_TERSE,
33  /** Produce copious output to allow someone to trace through
34  the computation.
35  */
36  VERBOSE = IMP_VERBOSE,
37  /** Log memory allocations and frees.*/
38  MEMORY = IMP_MEMORY
39 #ifndef IMP_DOXYGEN
40  ,
41  ALL_LOG = 6
42 #endif
43 };
44 
45 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
46 IMPBASEEXPORT std::istream &operator>>(std::istream &in, LogLevel &ll);
47 IMPBASEEXPORT std::ostream &operator<<(std::ostream &in, LogLevel ll);
48 #endif
49 
50 // duplicated in IMP_base_exception.i otherwise IMP_base_exception.i
51 // is processed without seeing this definition yet.
52 #ifndef SWIG
53 //! Specify the level of runtime checks performed
54 enum CheckLevel {
55  /** Use the default check level (eg IMP::base::Object::set_check_level()).*/
57  /** Perform no runtime checks.*/
58  NONE = IMP_NONE,
59  /** Perform checks that \imp is being called correctly.*/
60  USAGE = IMP_USAGE,
61  /** Check internal \imp invariants. This is to be used for debugging
62  \imp.*/
63  USAGE_AND_INTERNAL = IMP_INTERNAL
64 };
65 #endif
66 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
67 IMPBASEEXPORT std::istream &operator>>(std::istream &in, CheckLevel &ll);
68 IMPBASEEXPORT std::ostream &operator<<(std::ostream &in, CheckLevel ll);
69 #endif
70 
71 //! Specify the level of statistics to record
72 /** \see show_timings(). */
74  NO_STATISTICS = 0,
75  ALL_STATISTICS = 1
76 };
77 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
78 IMPBASEEXPORT std::istream &operator>>(std::istream &in, StatisticsLevel &ll);
79 IMPBASEEXPORT std::ostream &operator<<(std::ostream &in, StatisticsLevel ll);
80 #endif
81 
82 } // base
83 
84 } // imp
85 
86 #endif /* IMPBASE_ENUMS_H */
CheckLevel
Specify the level of runtime checks performed.
Definition: enums.h:54
LogLevel
The log levels supported by IMP.
Definition: enums.h:20
StatisticsLevel
Specify the level of statistics to record.
Definition: enums.h:73
Various compiler workarounds.