forked from kbinani/libvsq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventType.hpp
More file actions
78 lines (67 loc) · 1.45 KB
/
EventType.hpp
File metadata and controls
78 lines (67 loc) · 1.45 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
* EventType.h
* Copyright © 2012 kbinani
*
* This file is part of libvsq.
*
* libvsq is free software; you can redistribute it and/or
* modify it under the terms of the BSD License.
*
* libvsq is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef __EventType_h__
#define __EventType_h__
#include <string>
#include "vsqglobal.hpp"
VSQ_BEGIN_NAMESPACE
class EventType
{
public:
/**
* {@link Event} の種類を表現する列挙子
*/
enum EventTypeEnum
{
/**
* @brief 不明
*/
UNKNOWN = 0,
/**
* @brief 歌手
*/
SINGER = 1,
/**
* @brief 歌詞
*/
NOTE = 2,
/**
* @brief アイコン
*/
ICON = 3
};
/**
* @brief 文字列に変換する
* @param value 指定された列挙子の文字列表現
* @return 変換後の文字列
*/
static const std::string toString( EventTypeEnum value )
{
if( value == EventType::SINGER ){
return "Singer";
}else if( value == EventType::NOTE ){
return "Anote";
}else if( value == EventType::ICON ){
return "Aicon";
}else{
return "Unknown";
}
}
private:
EventType()
{
}
};
VSQ_END_NAMESPACE
#endif