TrinityCore
enuminfo_AppenderConsole.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "AppenderConsole.h"
19#include "Define.h"
20#include "SmartEnum.h"
21#include <stdexcept>
22
24{
25
26/********************************************************************\
27|* data for enum 'ColorTypes' in 'AppenderConsole.h' auto-generated *|
28\********************************************************************/
29template <>
31{
32 switch (value)
33 {
34 case BLACK: return { "BLACK", "BLACK", "" };
35 case RED: return { "RED", "RED", "" };
36 case GREEN: return { "GREEN", "GREEN", "" };
37 case BROWN: return { "BROWN", "BROWN", "" };
38 case BLUE: return { "BLUE", "BLUE", "" };
39 case MAGENTA: return { "MAGENTA", "MAGENTA", "" };
40 case CYAN: return { "CYAN", "CYAN", "" };
41 case GREY: return { "GREY", "GREY", "" };
42 case YELLOW: return { "YELLOW", "YELLOW", "" };
43 case LRED: return { "LRED", "LRED", "" };
44 case LGREEN: return { "LGREEN", "LGREEN", "" };
45 case LBLUE: return { "LBLUE", "LBLUE", "" };
46 case LMAGENTA: return { "LMAGENTA", "LMAGENTA", "" };
47 case LCYAN: return { "LCYAN", "LCYAN", "" };
48 case WHITE: return { "WHITE", "WHITE", "" };
49 default: throw std::out_of_range("value");
50 }
51}
52
53template <>
55
56template <>
58{
59 switch (index)
60 {
61 case 0: return BLACK;
62 case 1: return RED;
63 case 2: return GREEN;
64 case 3: return BROWN;
65 case 4: return BLUE;
66 case 5: return MAGENTA;
67 case 6: return CYAN;
68 case 7: return GREY;
69 case 8: return YELLOW;
70 case 9: return LRED;
71 case 10: return LGREEN;
72 case 11: return LBLUE;
73 case 12: return LMAGENTA;
74 case 13: return LCYAN;
75 case 14: return WHITE;
76 default: throw std::out_of_range("index");
77 }
78}
79
80template <>
82{
83 switch (value)
84 {
85 case BLACK: return 0;
86 case RED: return 1;
87 case GREEN: return 2;
88 case BROWN: return 3;
89 case BLUE: return 4;
90 case MAGENTA: return 5;
91 case CYAN: return 6;
92 case GREY: return 7;
93 case YELLOW: return 8;
94 case LRED: return 9;
95 case LGREEN: return 10;
96 case LBLUE: return 11;
97 case LMAGENTA: return 12;
98 case LCYAN: return 13;
99 case WHITE: return 14;
100 default: throw std::out_of_range("value");
101 }
102}
103}
ColorTypes
@ BROWN
@ LRED
@ WHITE
@ BLUE
@ GREY
@ LMAGENTA
@ MAGENTA
@ GREEN
@ CYAN
@ LBLUE
@ LCYAN
@ YELLOW
@ LGREEN
@ BLACK
@ RED
#define TC_API_EXPORT
Definition: Define.h:92
static size_t ToIndex(Enum index)
static EnumText ToString(Enum value)
static Enum FromIndex(size_t index)