-
Notifications
You must be signed in to change notification settings - Fork 0
/
clientcontroltype_gen.go
46 lines (36 loc) · 1.15 KB
/
clientcontroltype_gen.go
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
// Code generated by "genenum.exe -typename=ClientControlType -packagename=clientcontroltype -basedir=enum"
package clientcontroltype
import "fmt"
type ClientControlType uint8
const (
Keyboard ClientControlType = iota //
FollowMouse //
MoveToDest //
ClientControlType_Count int = iota
)
var _ClientControlType2string = [ClientControlType_Count][2]string{
Keyboard: {"Keyboard", ""},
FollowMouse: {"FollowMouse", ""},
MoveToDest: {"MoveToDest", ""},
}
func (e ClientControlType) String() string {
if e >= 0 && e < ClientControlType(ClientControlType_Count) {
return _ClientControlType2string[e][0]
}
return fmt.Sprintf("ClientControlType%d", uint8(e))
}
func (e ClientControlType) CommentString() string {
if e >= 0 && e < ClientControlType(ClientControlType_Count) {
return _ClientControlType2string[e][1]
}
return ""
}
var _string2ClientControlType = map[string]ClientControlType{
"Keyboard": Keyboard,
"FollowMouse": FollowMouse,
"MoveToDest": MoveToDest,
}
func String2ClientControlType(s string) (ClientControlType, bool) {
v, b := _string2ClientControlType[s]
return v, b
}