3
<title>SWIG:Examples:ruby:enum</title>
6
<body bgcolor="#ffffff">
9
<tt>SWIG/Examples/ruby/enum/</tt>
12
<H2>Wrapping enumerations</H2>
14
<tt>$Header: /cvs/projects/SWIG/Examples/ruby/enum/index.html,v 1.1 2000/09/20 17:13:41 fukusima Exp $</tt><br>
17
This example tests SWIG's ability to wrap enumerations. By default, SWIG
18
converts enumeration specifications into integer constants. Further use
19
of enumerated types are handled as integers.
22
<li><a href="example.h">example.h</a>. Header file containing some enums.
23
<li><a href="example.i">example.i</a>. Interface file.
24
<li><a href="runme.rb">runme.rb</a>. Sample Ruby script.
30
<li>SWIG allows arbitrary integers to be passed as enum values. However,
31
the result of passing an integer not corresponding to any of the values
32
specified in the <tt>enum</tt> specification is undefined.