Update for new enum wrapping which uses the typesafe enum pattern
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5953 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e18288ecab
commit
240f395497
3 changed files with 18 additions and 25 deletions
|
|
@ -14,9 +14,11 @@
|
|||
<tt>$Header$</tt><br>
|
||||
|
||||
<p>
|
||||
This example tests SWIG's ability to wrap enumerations. By default, SWIG
|
||||
converts enumeration specifications into integer constants. Further use
|
||||
of enumerated types are handled as integers.
|
||||
This example tests SWIG's ability to wrap enumerations.
|
||||
SWIG wraps enums in numerous different ways. The default approach is to wrap
|
||||
each enum with the typesafe enum pattern. Enums are handled as integers in the JNI layer.
|
||||
See the documentation for the other approaches for wrapping enums.
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="example.h">example.h</a>. Header file containing some enums.
|
||||
|
|
@ -24,14 +26,6 @@ of enumerated types are handled as integers.
|
|||
<li><a href="main.java">main.java</a>. Sample Java program.
|
||||
</ul>
|
||||
|
||||
<h2>Notes</h2>
|
||||
|
||||
<ul>
|
||||
<li>SWIG allows arbitrary integers to be passed as enum values. However,
|
||||
the result of passing an integer not corresponding to any of the values
|
||||
specified in the <tt>enum</tt> specification is undefined.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue