PageRenderTime 57ms CodeModel.GetById 16ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. <html>
  2. <head>
  3. <title>SWIG:Examples:go:enum</title>
  4. </head>
  5. <body bgcolor="#ffffff">
  6. <tt>SWIG/Examples/go/enum/</tt>
  7. <hr>
  8. <H2>Wrapping enumerations</H2>
  9. <p>
  10. This example tests SWIG's ability to wrap enumerations.
  11. <ul>
  12. <li>
  13. Enum values are expressed as constants or variables in GO.
  14. <li>
  15. If the enum is named, then that name, capitalized, as defined as a new
  16. type name for <tt>int</tt>. All the enum values will be defined to
  17. have that type.
  18. <li>
  19. If the enum is declared at global level, then the name in Go is simply
  20. the enum value, capitalized.
  21. <li>
  22. If the enum is declared within a C++ class or struct, then the name in
  23. Go is the capitalized name of the class or struct followed by the
  24. capitalized name of the enum value.
  25. <li>
  26. </ul>
  27. <p>
  28. <ul>
  29. <li><a href="example.h">example.h</a>. Header file containing some enums.
  30. <li><a href="example.i">example.i</a>. Interface file.
  31. <li><a href="runme.go">runme.go</a>. Sample Go program.
  32. </ul>
  33. <hr>
  34. </body>
  35. </html>