Add support for the Go programming language.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12108 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
09f14197ac
commit
5af2978f77
259 changed files with 16159 additions and 14 deletions
42
Examples/go/enum/index.html
Normal file
42
Examples/go/enum/index.html
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>SWIG:Examples:go:enum</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
|
||||
|
||||
<tt>SWIG/Examples/go/enum/</tt>
|
||||
<hr>
|
||||
|
||||
<H2>Wrapping enumerations</H2>
|
||||
|
||||
<p>
|
||||
This example tests SWIG's ability to wrap enumerations.
|
||||
<ul>
|
||||
<li>
|
||||
Enum values are expressed as constants or variables in GO.
|
||||
<li>
|
||||
If the enum is named, then that name, capitalized, as defined as a new
|
||||
type name for <tt>int</tt>. All the enum values will be defined to
|
||||
have that type.
|
||||
<li>
|
||||
If the enum is declared at global level, then the name in Go is simply
|
||||
the enum value, capitalized.
|
||||
<li>
|
||||
If the enum is declared within a C++ class or struct, then the name in
|
||||
Go is the capitalized name of the class or struct followed by the
|
||||
capitalized name of the enum value.
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<ul>
|
||||
<li><a href="example.h">example.h</a>. Header file containing some enums.
|
||||
<li><a href="example.i">example.i</a>. Interface file.
|
||||
<li><a href="runme.go">runme.go</a>. Sample Go program.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue