diff options
Diffstat (limited to 'libraries/irrlicht-1.8/include/ILogger.h')
-rw-r--r-- | libraries/irrlicht-1.8/include/ILogger.h | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/libraries/irrlicht-1.8/include/ILogger.h b/libraries/irrlicht-1.8/include/ILogger.h index b6c9f6f..53f6273 100644 --- a/libraries/irrlicht-1.8/include/ILogger.h +++ b/libraries/irrlicht-1.8/include/ILogger.h | |||
@@ -1,102 +1,102 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_LOGGER_H_INCLUDED__ | 5 | #ifndef __I_LOGGER_H_INCLUDED__ |
6 | #define __I_LOGGER_H_INCLUDED__ | 6 | #define __I_LOGGER_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | 12 | ||
13 | //! Possible log levels. | 13 | //! Possible log levels. |
14 | //! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. | 14 | //! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. |
15 | //! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE | 15 | //! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE |
16 | //! messages are never filtered and always printed. | 16 | //! messages are never filtered and always printed. |
17 | enum ELOG_LEVEL | 17 | enum ELOG_LEVEL |
18 | { | 18 | { |
19 | //! Used for printing information helpful in debugging | 19 | //! Used for printing information helpful in debugging |
20 | ELL_DEBUG, | 20 | ELL_DEBUG, |
21 | 21 | ||
22 | //! Useful information to print. For example hardware infos or something started/stopped. | 22 | //! Useful information to print. For example hardware infos or something started/stopped. |
23 | ELL_INFORMATION, | 23 | ELL_INFORMATION, |
24 | 24 | ||
25 | //! Warnings that something isn't as expected and can cause oddities | 25 | //! Warnings that something isn't as expected and can cause oddities |
26 | ELL_WARNING, | 26 | ELL_WARNING, |
27 | 27 | ||
28 | //! Something did go wrong. | 28 | //! Something did go wrong. |
29 | ELL_ERROR, | 29 | ELL_ERROR, |
30 | 30 | ||
31 | //! Logs with ELL_NONE will never be filtered. | 31 | //! Logs with ELL_NONE will never be filtered. |
32 | //! And used as filter it will remove all logging except ELL_NONE messages. | 32 | //! And used as filter it will remove all logging except ELL_NONE messages. |
33 | ELL_NONE | 33 | ELL_NONE |
34 | }; | 34 | }; |
35 | 35 | ||
36 | 36 | ||
37 | //! Interface for logging messages, warnings and errors | 37 | //! Interface for logging messages, warnings and errors |
38 | class ILogger : public virtual IReferenceCounted | 38 | class ILogger : public virtual IReferenceCounted |
39 | { | 39 | { |
40 | public: | 40 | public: |
41 | 41 | ||
42 | //! Destructor | 42 | //! Destructor |
43 | virtual ~ILogger() {} | 43 | virtual ~ILogger() {} |
44 | 44 | ||
45 | //! Returns the current set log level. | 45 | //! Returns the current set log level. |
46 | virtual ELOG_LEVEL getLogLevel() const = 0; | 46 | virtual ELOG_LEVEL getLogLevel() const = 0; |
47 | 47 | ||
48 | //! Sets a new log level. | 48 | //! Sets a new log level. |
49 | /** With this value, texts which are sent to the logger are filtered | 49 | /** With this value, texts which are sent to the logger are filtered |
50 | out. For example setting this value to ELL_WARNING, only warnings and | 50 | out. For example setting this value to ELL_WARNING, only warnings and |
51 | errors are printed out. Setting it to ELL_INFORMATION, which is the | 51 | errors are printed out. Setting it to ELL_INFORMATION, which is the |
52 | default setting, warnings, errors and informational texts are printed | 52 | default setting, warnings, errors and informational texts are printed |
53 | out. | 53 | out. |
54 | \param ll: new log level filter value. */ | 54 | \param ll: new log level filter value. */ |
55 | virtual void setLogLevel(ELOG_LEVEL ll) = 0; | 55 | virtual void setLogLevel(ELOG_LEVEL ll) = 0; |
56 | 56 | ||
57 | //! Prints out a text into the log | 57 | //! Prints out a text into the log |
58 | /** \param text: Text to print out. | 58 | /** \param text: Text to print out. |
59 | \param ll: Log level of the text. If the text is an error, set | 59 | \param ll: Log level of the text. If the text is an error, set |
60 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it | 60 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it |
61 | is just an informational text, set it to ELL_INFORMATION. Texts are | 61 | is just an informational text, set it to ELL_INFORMATION. Texts are |
62 | filtered with these levels. If you want to be a text displayed, | 62 | filtered with these levels. If you want to be a text displayed, |
63 | independent on what level filter is set, use ELL_NONE. */ | 63 | independent on what level filter is set, use ELL_NONE. */ |
64 | virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; | 64 | virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; |
65 | 65 | ||
66 | //! Prints out a text into the log | 66 | //! Prints out a text into the log |
67 | /** \param text: Text to print out. | 67 | /** \param text: Text to print out. |
68 | \param hint: Additional info. This string is added after a " :" to the | 68 | \param hint: Additional info. This string is added after a " :" to the |
69 | string. | 69 | string. |
70 | \param ll: Log level of the text. If the text is an error, set | 70 | \param ll: Log level of the text. If the text is an error, set |
71 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it | 71 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it |
72 | is just an informational text, set it to ELL_INFORMATION. Texts are | 72 | is just an informational text, set it to ELL_INFORMATION. Texts are |
73 | filtered with these levels. If you want to be a text displayed, | 73 | filtered with these levels. If you want to be a text displayed, |
74 | independent on what level filter is set, use ELL_NONE. */ | 74 | independent on what level filter is set, use ELL_NONE. */ |
75 | virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; | 75 | virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; |
76 | virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; | 76 | virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; |
77 | 77 | ||
78 | //! Prints out a text into the log | 78 | //! Prints out a text into the log |
79 | /** \param text: Text to print out. | 79 | /** \param text: Text to print out. |
80 | \param hint: Additional info. This string is added after a " :" to the | 80 | \param hint: Additional info. This string is added after a " :" to the |
81 | string. | 81 | string. |
82 | \param ll: Log level of the text. If the text is an error, set | 82 | \param ll: Log level of the text. If the text is an error, set |
83 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it | 83 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it |
84 | is just an informational text, set it to ELL_INFORMATION. Texts are | 84 | is just an informational text, set it to ELL_INFORMATION. Texts are |
85 | filtered with these levels. If you want to be a text displayed, | 85 | filtered with these levels. If you want to be a text displayed, |
86 | independent on what level filter is set, use ELL_NONE. */ | 86 | independent on what level filter is set, use ELL_NONE. */ |
87 | virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; | 87 | virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; |
88 | 88 | ||
89 | //! Prints out a text into the log | 89 | //! Prints out a text into the log |
90 | /** \param text: Text to print out. | 90 | /** \param text: Text to print out. |
91 | \param ll: Log level of the text. If the text is an error, set | 91 | \param ll: Log level of the text. If the text is an error, set |
92 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it | 92 | it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it |
93 | is just an informational text, set it to ELL_INFORMATION. Texts are | 93 | is just an informational text, set it to ELL_INFORMATION. Texts are |
94 | filtered with these levels. If you want to be a text displayed, | 94 | filtered with these levels. If you want to be a text displayed, |
95 | independent on what level filter is set, use ELL_NONE. */ | 95 | independent on what level filter is set, use ELL_NONE. */ |
96 | virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; | 96 | virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; |
97 | }; | 97 | }; |
98 | 98 | ||
99 | } // end namespace | 99 | } // end namespace |
100 | 100 | ||
101 | #endif | 101 | #endif |
102 | 102 | ||