TrinityCore
enuminfo_ArenaTeam.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 "ArenaTeam.h"
19#include "Define.h"
20#include "SmartEnum.h"
21#include <stdexcept>
22
24{
25
26/******************************************************************\
27|* data for enum 'ArenaTeamTypes' in 'ArenaTeam.h' auto-generated *|
28\******************************************************************/
29template <>
31{
32 switch (value)
33 {
34 case ARENA_TEAM_2v2: return { "ARENA_TEAM_2v2", "ARENA_TEAM_2v2", "" };
35 case ARENA_TEAM_3v3: return { "ARENA_TEAM_3v3", "ARENA_TEAM_3v3", "" };
36 case ARENA_TEAM_5v5: return { "ARENA_TEAM_5v5", "ARENA_TEAM_5v5", "" };
37 default: throw std::out_of_range("value");
38 }
39}
40
41template <>
43
44template <>
46{
47 switch (index)
48 {
49 case 0: return ARENA_TEAM_2v2;
50 case 1: return ARENA_TEAM_3v3;
51 case 2: return ARENA_TEAM_5v5;
52 default: throw std::out_of_range("index");
53 }
54}
55
56template <>
58{
59 switch (value)
60 {
61 case ARENA_TEAM_2v2: return 0;
62 case ARENA_TEAM_3v3: return 1;
63 case ARENA_TEAM_5v5: return 2;
64 default: throw std::out_of_range("value");
65 }
66}
67}
ArenaTeamTypes
Definition: ArenaTeam.h:77
@ ARENA_TEAM_5v5
Definition: ArenaTeam.h:80
@ ARENA_TEAM_2v2
Definition: ArenaTeam.h:78
@ ARENA_TEAM_3v3
Definition: ArenaTeam.h:79
#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)