Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Log.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_MOLASSEMBLER_LOG_H
9 #define INCLUDE_MOLASSEMBLER_LOG_H
10 
11 #include "Molassembler/Export.h"
12 #include <unordered_set>
13 #include <iostream>
14 
15 namespace Scine {
16 namespace Molassembler {
17 namespace Log {
18 
19 namespace Detail {
20 class NullBuffer : public std::streambuf {
21 public:
22  int overflow(int c) override;
23 };
24 
25 // Some objects we need
26 extern NullBuffer nullBuffer;
27 extern std::ostream nullStream;
28 } // namespace Detail
29 
31 enum class MASM_EXPORT Level : unsigned {
32  Trace,
33  Debug,
34  Info,
35  Warning,
36  Error,
37  Fatal,
38  None
39 };
40 
42 enum class MASM_EXPORT Particulars {
47  AtomStereopermutatorFit,
50  AtomStereopermutatorStatePropagation,
54  PrototypePropagatorDebugInfo,
56  DgRefinementChiralityNumericalDebugInfo,
60  DgRefinementProgress,
62  DgFinalErrorContributions,
64  DgStructureAcceptanceFailures,
66  gatherDGInformationTrees,
68  DgDebugInfo,
70  RankingTreeDebugInfo
71 };
72 
73 
75 MASM_EXPORT extern Level level;
77 MASM_EXPORT extern std::unordered_set<Particulars> particulars;
78 
85 std::ostream& log(const Level& decisionLevel);
92 std::ostream& log(const Particulars& particular);
94 bool isSet(Particulars particular);
95 
96 } // namespace Log
97 } // namespace Molassembler
98 } // namespace Scine
99 #endif