IMP  2.0.1
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-2013 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 //IMPBASE_BEGIN_NAMESPACE
14 namespace IMP {
15 
16 namespace base {
17 //! The log levels supported by \imp
18 enum LogLevel {
19  /** Use to specify that the global log level should be used
20  (eg in IMP::base::Object::set_log_level())*/
21  DEFAULT = -1,
22  /** Do not output any text.*/
23  SILENT = IMP_SILENT,
24  /** Output only warnings.*/
25  WARNING = IMP_SILENT+1,
26  /** Output only progress meter style displays and occasional printouts
27  when switching phases of work.*/
28  PROGRESS = IMP_PROGRESS,
29  /** Output a line or two per evaluation call.*/
30  TERSE = IMP_TERSE,
31  /** Produce copious output to allow someone to trace through
32  the computation.
33  */
34  VERBOSE = IMP_VERBOSE,
35  /** Log memory allocations and frees.*/
36  MEMORY = IMP_VERBOSE+1
37 #ifndef IMP_DOXYGEN
38  , ALL_LOG=6
39 #endif
40 };
41 
42 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
43 IMPBASEEXPORT std::istream &operator>>(std::istream &in,
44  LogLevel &ll);
45 IMPBASEEXPORT std::ostream &operator<<(std::ostream &in,
46  LogLevel &ll);
47 #endif
48 
49 // duplicated in IMP_base_exception.i otherwise IMP_base_exception.i
50 // is processed without seeing this definition yet.
51 #ifndef SWIG
52 //! Specify the level of runtime checks performed
53 enum CheckLevel {
54  /** Use the default check level (eg IMP::base::Object::set_check_level()).*/
56  /** Perform no runtime checks.*/
57  NONE = IMP_NONE,
58  /** Perform checks that \imp is being called correctly.*/
59  USAGE = IMP_USAGE,
60  /** Check internal \imp invariants. This is to be used for debugging
61  \imp.*/
62  USAGE_AND_INTERNAL = IMP_INTERNAL};
63 #endif
64 
65 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
66 IMPBASEEXPORT std::istream &operator>>(std::istream &in,
67  CheckLevel &ll);
68 #endif
69 }
70 } //IMPBASE_END_NAMESPACE
71 
72 #endif /* IMPBASE_ENUMS_H */