-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathplatformavailability.go
75 lines (66 loc) · 1.79 KB
/
platformavailability.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package clang
// #include <stdlib.h>
// #include "go-clang.h"
import "C"
/**
* Describes the availability of a given entity on a particular platform, e.g.,
* a particular class might only be available on Mac OS 10.7 or newer.
*/
type PlatformAvailability struct {
c C.CXPlatformAvailability
}
/**
* \brief A string that describes the platform for which this structure
* provides availability information.
*
* Possible values are "ios" or "macosx".
*/
func (p *PlatformAvailability) Platform() string {
o := cxstring{p.c.Platform}
//defer o.Dispose() // done by PlatformAvailability.Dispose()
return o.String()
}
/**
* \brief The version number in which this entity was introduced.
*/
func (p *PlatformAvailability) Introduced() Version {
o := Version{p.c.Introduced}
return o
}
/**
* \brief The version number in which this entity was deprecated (but is
* still available).
*/
func (p *PlatformAvailability) Deprecated() Version {
o := Version{p.c.Deprecated}
return o
}
/**
* \brief The version number in which this entity was obsoleted, and therefore
* is no longer available.
*/
func (p *PlatformAvailability) Obsoleted() Version {
o := Version{p.c.Obsoleted}
return o
}
/**
* \brief Whether the entity is unconditionally unavailable on this platform.
*/
func (p *PlatformAvailability) Unavailable() int {
return int(p.c.Unavailable)
}
/**
* \brief An optional message to provide to a user of this API, e.g., to
* suggest replacement APIs.
*/
func (p *PlatformAvailability) Message() string {
o := cxstring{p.c.Message}
//defer o.Dispose() // done by PlatformAvailability.Dispose()
return o.String()
}
/**
* \brief Free the memory associated with a \c CXPlatformAvailability structure.
*/
func (p *PlatformAvailability) Dispose() {
C.clang_disposeCXPlatformAvailability(&p.c)
}