[8765] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Fabian 'x3n' Landau |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef _OutputDefinitions_H__ |
---|
| 30 | #define _OutputDefinitions_H__ |
---|
| 31 | |
---|
| 32 | #include "util/UtilPrereqs.h" |
---|
[8771] | 33 | #include <string> |
---|
[8765] | 34 | |
---|
[8778] | 35 | #define REGISTER_OUTPUT_CONTEXT(name) \ |
---|
| 36 | OutputContext name() { static OutputContext value = registerContext(#name); return value; } |
---|
| 37 | |
---|
[8765] | 38 | namespace orxonox |
---|
| 39 | { |
---|
| 40 | namespace test |
---|
| 41 | { |
---|
| 42 | typedef uint16_t OutputLevel; |
---|
| 43 | |
---|
| 44 | namespace level |
---|
| 45 | { |
---|
| 46 | static const OutputLevel all = 0xFFFF; |
---|
| 47 | static const OutputLevel none = 0x0000; |
---|
| 48 | static const OutputLevel debug_output = 0x0001; |
---|
| 49 | static const OutputLevel user_error = 0x0002; |
---|
| 50 | static const OutputLevel user_warning = 0x0004; |
---|
| 51 | static const OutputLevel user_status = 0x0008; |
---|
| 52 | static const OutputLevel user_info = 0x0010; |
---|
| 53 | static const OutputLevel internal_error = 0x0020; |
---|
| 54 | static const OutputLevel internal_warning = 0x0040; |
---|
| 55 | static const OutputLevel internal_status = 0x0080; |
---|
| 56 | static const OutputLevel internal_info = 0x0100; |
---|
| 57 | static const OutputLevel verbose = 0x0200; |
---|
| 58 | static const OutputLevel verbose_more = 0x0400; |
---|
| 59 | static const OutputLevel verbose_ultra = 0x0800; |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | typedef uint64_t OutputContext; |
---|
[8777] | 63 | typedef OutputContext (OutputContextFunction)(); |
---|
[8765] | 64 | |
---|
[8771] | 65 | extern _UtilExport OutputContext registerContext(const std::string& name); |
---|
| 66 | |
---|
[8765] | 67 | namespace context |
---|
| 68 | { |
---|
| 69 | static const OutputContext all = 0xFFFFFFFFFFFFFFFF; |
---|
| 70 | static const OutputContext none = 0x0000000000000000; |
---|
| 71 | |
---|
[8777] | 72 | namespace |
---|
| 73 | { |
---|
[8778] | 74 | REGISTER_OUTPUT_CONTEXT(undefined); |
---|
[8777] | 75 | |
---|
[8778] | 76 | REGISTER_OUTPUT_CONTEXT(test1); |
---|
| 77 | REGISTER_OUTPUT_CONTEXT(test2); |
---|
| 78 | REGISTER_OUTPUT_CONTEXT(output); |
---|
[8777] | 79 | } |
---|
[8765] | 80 | } |
---|
| 81 | } |
---|
| 82 | } |
---|
| 83 | |
---|
| 84 | #endif /* _OutputDefinitions_H__ */ |
---|