forked from sbinet/go-clang
-
Notifications
You must be signed in to change notification settings - Fork 1
/
availabilitykind.go
49 lines (43 loc) · 1.11 KB
/
availabilitykind.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
package clang
// #include <stdlib.h>
// #include "go-clang.h"
import "C"
/**
* \brief Describes the availability of a particular entity, which indicates
* whether the use of this entity will result in a warning or error due to
* it being deprecated or unavailable.
*/
type AvailabilityKind uint32
const (
/**
* \brief The entity is available.
*/
Available AvailabilityKind = C.CXAvailability_Available
/**
* \brief The entity is available, but has been deprecated (and its use is
* not recommended).
*/
Deprecated AvailabilityKind = C.CXAvailability_Deprecated
/**
* \brief The entity is not available; any use of it will be an error.
*/
NotAvailable AvailabilityKind = C.CXAvailability_NotAvailable
/**
* \brief The entity is available, but not accessible; any use of it will be
* an error.
*/
NotAccessible AvailabilityKind = C.CXAvailability_NotAccessible
)
func (ak AvailabilityKind) String() string {
switch ak {
case Available:
return "Available"
case Deprecated:
return "Deprecated"
case NotAvailable:
return "NotAvailable"
case NotAccessible:
return "NotAccessible"
}
return ""
}