-
Notifications
You must be signed in to change notification settings - Fork 3
/
topologies_string.go
48 lines (40 loc) · 1.4 KB
/
topologies_string.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
47
48
// Code generated by "stringer -type=Topologies"; DO NOT EDIT.
package vgpu
import (
"errors"
"strconv"
)
var _ = errors.New("dummy error")
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[PointList-0]
_ = x[LineList-1]
_ = x[LineStrip-2]
_ = x[TriangleList-3]
_ = x[TriangleStrip-4]
_ = x[TriangleFan-5]
_ = x[LineListWithAdjacency-6]
_ = x[LineStripWithAdjacency-7]
_ = x[TriangleListWithAdjacency-8]
_ = x[TriangleStripWithAdjacency-9]
_ = x[PatchList-10]
}
const _Topologies_name = "PointListLineListLineStripTriangleListTriangleStripTriangleFanLineListWithAdjacencyLineStripWithAdjacencyTriangleListWithAdjacencyTriangleStripWithAdjacencyPatchList"
var _Topologies_index = [...]uint8{0, 9, 17, 26, 38, 51, 62, 83, 105, 130, 156, 165}
func (i Topologies) String() string {
if i < 0 || i >= Topologies(len(_Topologies_index)-1) {
return "Topologies(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Topologies_name[_Topologies_index[i]:_Topologies_index[i+1]]
}
func (i *Topologies) FromString(s string) error {
for j := 0; j < len(_Topologies_index)-1; j++ {
if s == _Topologies_name[_Topologies_index[j]:_Topologies_index[j+1]] {
*i = Topologies(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: Topologies")
}