PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/go/enum/index.html

#
HTML | 42 lines | 35 code | 7 blank | 0 comment | 0 complexity | ee64107c9dc582680ccc6d21c4fe7402 MD5 | raw file
 1<html>
 2<head>
 3<title>SWIG:Examples:go:enum</title>
 4</head>
 5
 6<body bgcolor="#ffffff">
 7
 8
 9<tt>SWIG/Examples/go/enum/</tt>
10<hr>
11
12<H2>Wrapping enumerations</H2>
13
14<p>
15This example tests SWIG's ability to wrap enumerations.
16<ul>
17<li>
18Enum values are expressed as constants or variables in GO.
19<li>
20If the enum is named, then that name, capitalized, as defined as a new
21type name for <tt>int</tt>.  All the enum values will be defined to
22have that type.
23<li>
24If the enum is declared at global level, then the name in Go is simply
25the enum value, capitalized.
26<li>
27If the enum is declared within a C++ class or struct, then the name in
28Go is the capitalized name of the class or struct followed by the
29capitalized name of the enum value.
30<li>
31</ul>
32
33<p>
34<ul>
35<li><a href="example.h">example.h</a>.  Header file containing some enums.
36<li><a href="example.i">example.i</a>.  Interface file.
37<li><a href="runme.go">runme.go</a>. Sample Go program.
38</ul>
39
40<hr>
41</body>
42</html>