-
Notifications
You must be signed in to change notification settings - Fork 47
/
idecltypes.h
42 lines (37 loc) · 876 Bytes
/
idecltypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <stdexcept>
#include <string>
#include "i18n.h"
namespace decl
{
// Enumeration of declaration types supported by DarkRadiant
enum class Type
{
Undetermined = -2,
None = -1,
Material = 0,
EntityDef,
SoundShader,
Model,
ModelDef,
Particle,
Skin,
};
inline std::string getTypeName(Type type)
{
switch (type)
{
case Type::Undetermined: return _("Undetermined");
case Type::None: return _("None");
case Type::Material: return _("Material");
case Type::EntityDef: return _("EntityDef");
case Type::SoundShader: return _("SoundShader");
case Type::Model: return _("Model");
case Type::ModelDef: return _("ModelDef");
case Type::Particle: return _("Particle");
case Type::Skin: return _("Skin");
default:
throw std::runtime_error("Unhandled decl type");
}
}
}