/tags/rel-1-3-26/SWIG/Examples/ruby/enum/index.html

# · HTML · 37 lines · 27 code · 10 blank · 0 comment · 0 complexity · d4d4926d5f6981dce6bfdb22f299f0fa MD5 · raw file

  1. <html>
  2. <head>
  3. <title>SWIG:Examples:ruby:enum</title>
  4. </head>
  5. <body bgcolor="#ffffff">
  6. <tt>SWIG/Examples/ruby/enum/</tt>
  7. <hr>
  8. <H2>Wrapping enumerations</H2>
  9. <tt>$Header$</tt><br>
  10. <p>
  11. This example tests SWIG's ability to wrap enumerations. By default, SWIG
  12. converts enumeration specifications into integer constants. Further use
  13. of enumerated types are handled as integers.
  14. <ul>
  15. <li><a href="example.h">example.h</a>. Header file containing some enums.
  16. <li><a href="example.i">example.i</a>. Interface file.
  17. <li><a href="runme.rb">runme.rb</a>. Sample Ruby script.
  18. </ul>
  19. <h2>Notes</h2>
  20. <ul>
  21. <li>SWIG allows arbitrary integers to be passed as enum values. However,
  22. the result of passing an integer not corresponding to any of the values
  23. specified in the <tt>enum</tt> specification is undefined.
  24. </ul>
  25. <hr>
  26. </body>
  27. </html>