-
Notifications
You must be signed in to change notification settings - Fork 21
/
enum.go
56 lines (36 loc) · 1.07 KB
/
enum.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
49
50
51
52
53
54
55
56
package cwl
import (
"fmt"
)
type Enum string
//type Enum struct {
// CWLType_Impl `yaml:",inline" json:",inline" bson:",inline" mapstructure:",squash"`
// Symbols []string `yaml:"symbols,omitempty" json:"symbols,omitempty" bson:"symbols,omitempty"`
//}
func (s *Enum) Is_CWL_object() {}
func (s *Enum) GetClass() string { return string(CWL_enum) } // for CWL_object
func (s *Enum) GetType() CWLType_Type { return CWL_enum }
func (s *Enum) String() string { return string(*s) }
func (s *Enum) GetId() string { return "" }
func (s *Enum) SetId(i string) {}
func (s *Enum) Is_CWL_minimal() {}
func NewEnumFromstring(value string) (s *Enum) {
var s_nptr Enum
s_nptr = Enum(value)
s = &s_nptr
return
}
func NewEnum(id string, value string) (s *Enum) {
_ = id
return NewEnumFromstring(value)
}
func NewEnumFromInterface(id string, native interface{}) (s *Enum, err error) {
_ = id
real_string, ok := native.(string)
if !ok {
err = fmt.Errorf("(NewEnumFromInterface) Cannot create string")
return
}
s = NewEnumFromstring(real_string)
return
}