IMessageOutput.hpp
1 #ifndef DM_IMESSAGE_OUTPUT_HPP_INCLUDED
2 #define DM_IMESSAGE_OUTPUT_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/Handle.hpp"
10 #include "DM/ObjectBase.hpp"
11 
12 DM_NAMESPACE_BEGIN
13 
14 /// Enumerator defining different importance levels of log records
15 namespace MessageLevel {
16  enum Type {
17  undefined, ///< undefined message type
18  error, ///< some failure message. program execution will be aborted.
19  warning, ///< some weird program state which can still be handled (e.g. 'poor matrix condition', 'poor data distribution')
20  info, ///< Some progress that may be interesting in everyday-use
21  verbose, ///< Something that may help in understanding normal program behaviour
22  debug, ///< Anything that may help 'debugging' by means of a release-build
23  Count ///< number of elements
24  };
25 };
26 
27 class DM_API IMessageOutput : public ObjectBase
28 {
29 public:
30  virtual void write(MessageLevel::Type level, const char *) = 0;
31 };
32 
34 
35 DM_NAMESPACE_END
36 
37 #endif //DM_IMESSAGE_OUTPUT_HPP_INCLUDED