Common template for head of each file detailing licence, distribution and authors information

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-03-07 00:14:10 +00:00
commit 49be05f4fd
153 changed files with 1209 additions and 801 deletions

View file

@ -1,24 +1,28 @@
/* arrays_java.i
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* arrays_java.i
*
* These typemaps give more natural support for arrays. The typemaps are not efficient
* as there is a lot of copying of the array values whenever the array is passed to C/C++
* from Java and visa versa. The Java array is expected to be the same size as the C array.
* An exception is thrown if they are not.
Example usage:
Wrapping:
%include <arrays_java.i>
%inline %{
short FiddleSticks[3];
%}
Use from Java like this:
short[] fs = new short[] {10, 11, 12};
example.setFiddleSticks(fs);
fs = example.getFiddleSticks();
*/
*
* Example usage:
* Wrapping:
*
* %include <arrays_java.i>
* %inline %{
* short FiddleSticks[3];
* %}
*
* Use from Java like this:
*
* short[] fs = new short[] {10, 11, 12};
* example.setFiddleSticks(fs);
* fs = example.getFiddleSticks();
* ----------------------------------------------------------------------------- */
/* Primitive array support is a combination of SWIG macros and functions in order to reduce
* code bloat and aid maintainability. The SWIG preprocessor expands the macros into functions

View file

@ -1,14 +1,12 @@
/***********************************************************************
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* director.swg
*
* This file contains support for director classes that proxy
* method calls from C++ to Java extensions.
*
* Author : Scott Michel (scottm@aero.org)
*
* This file was adapted from the python director.swg, written by
* Mark Rose (mrose@stm.lbl.gov)
************************************************************************/
* This file contains support for director classes that proxy
* method calls from C++ to Java extensions.
* ----------------------------------------------------------------------------- */
#ifdef __cplusplus

View file

@ -1,4 +1,9 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* enums.swg
*
* Include this file in order for C/C++ enums to be wrapped by proper Java enums.
* Note that the JNI layer handles the enum as an int. The Java enum has extra
* code generated to store the C++ int value. This is required for C++ enums that

View file

@ -1,4 +1,9 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* enumsimple.swg
*
* This file provides backwards compatible enum wrapping. SWIG versions 1.3.21
* and earlier wrapped global enums with constant integers in the module class
* or Constants interface. Enums declared within a C++ class were wrapped by

View file

@ -1,4 +1,9 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* enumtypesafe.swg
*
* Include this file in order for C/C++ enums to be wrapped by the so called
* typesafe enum pattern. Each enum has an equivalent Java class named after the
* enum and each enum item is a static instance of this class.

View file

@ -1,4 +1,9 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* enumtypeunsafe.swg
*
* Include this file in order for C/C++ enums to be wrapped by integers values.
* Each enum has an equivalent class named after the enum and the enum items are
* wrapped by constant integers within this class. The enum items are not

View file

@ -1,10 +1,12 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* java.swg
*
* Java typemaps
* ----------------------------------------------------------------------------- */
%include <javahead.swg>
/* The jni, jtype and jstype typemaps work together and so there should be one of each.

View file

@ -1,4 +1,7 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* javahead.swg
*
* Java support code

View file

@ -1,5 +1,5 @@
#ifndef __java_javakw_swg__
#define __java_javakw_swg__
#ifndef JAVA_JAVAKW_SWG_
#define JAVA_JAVAKW_SWG_
/* Warnings for Java keywords */
#define JAVAKW(x) %namewarn("314:" #x " is a java keyword") #x
@ -67,4 +67,4 @@ JAVAKW(while);
#undef JAVAKW
#endif //__java_javakw_swg__
#endif //JAVA_JAVAKW_SWG_

View file

@ -1,6 +1,13 @@
// Typemaps used by the STL wrappers that throw exceptions.
// These typemaps are used when methods are declared with an STL exception specification, such as
// size_t at() const throw (std::out_of_range);
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* std_except.i
*
* Typemaps used by the STL wrappers that throw exceptions.
* These typemaps are used when methods are declared with an STL exception specification, such as
* size_t at() const throw (std::out_of_range);
* ----------------------------------------------------------------------------- */
%{
#include <stdexcept>

View file

@ -1,9 +1,11 @@
//
// SWIG typemaps for std::map
// Luigi Ballabio
// Jan. 2003
//
// Common implementation
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* std_map.i
*
* SWIG typemaps for std::map
* ----------------------------------------------------------------------------- */
%include <std_common.i>

View file

@ -1,9 +1,11 @@
//
// SWIG typemaps for std::pair
// Luigi Ballabio
// July 2003
//
// Common implementation
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* std_pair.i
*
* SWIG typemaps for std::pair
* ----------------------------------------------------------------------------- */
%include <std_common.i>
%include <exception.i>

View file

@ -1,17 +1,15 @@
//
// SWIG typemaps for std::string
// Luigi Ballabio, Tal Shalif and William Fulton
// May 7, 2002
//
// Java implementation
//
/* ------------------------------------------------------------------------
Typemaps for std::string and const std::string&
These are mapped to a Java String and are passed around by value.
To use non-const std::string references use the following %apply. Note
that they are passed by value.
%apply const std::string & {std::string &};
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* std_string.i
*
* Typemaps for std::string and const std::string&
* These are mapped to a Java String and are passed around by value.
*
* To use non-const std::string references use the following %apply. Note
* that they are passed by value.
* %apply const std::string & {std::string &};
------------------------------------------------------------------------ */
%{

View file

@ -1,3 +1,10 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* std_vector.i
* ----------------------------------------------------------------------------- */
%include <std_common.i>
%{

View file

@ -1,14 +1,19 @@
/* ------------------------------------------------------------------------
Typemaps for std::wstring and const std::wstring&
These are mapped to a Java String and are passed around by value.
Warning: Unicode / multibyte characters are handled differently on different
OSs so the std::wstring typemaps may not always work as intended.
To use non-const std::wstring references use the following %apply. Note
that they are passed by value.
%apply const std::wstring & {std::wstring &};
------------------------------------------------------------------------ */
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* std_wstring.i
*
* Typemaps for std::wstring and const std::wstring&
*
* These are mapped to a Java String and are passed around by value.
* Warning: Unicode / multibyte characters are handled differently on different
* OSs so the std::wstring typemaps may not always work as intended.
*
* To use non-const std::wstring references use the following %apply. Note
* that they are passed by value.
* %apply const std::wstring & {std::wstring &};
* ----------------------------------------------------------------------------- */
namespace std {

View file

@ -1,4 +1,10 @@
/* initial STL definition. extended as needed in each language */
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* stl.i
* ----------------------------------------------------------------------------- */
%include <std_common.i>
%include <std_string.i>
%include <std_vector.i>

View file

@ -1,17 +1,15 @@
//
// SWIG Typemap library
// William Fulton
// 4 January 2002
//
// Java implementation
//
// ------------------------------------------------------------------------
// Pointer and reference handling
//
// These mappings provide support for input/output arguments and common
// uses for C/C++ pointers and C++ references.
// ------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* typemaps.i
*
* SWIG Java typemap library
* Pointer and reference handling
*
* These mappings provide support for input/output arguments and common
* uses for C/C++ pointers and C++ references.
* ----------------------------------------------------------------------------- */
// INPUT typemaps.
// These remap a C pointer or C++ reference to be an "INPUT" value which is passed by value

View file

@ -1,8 +1,12 @@
/*
* SWIG Typemap library for Java
* Various useful typemaps.
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
*/
* various.i
*
* SWIG Typemap library for Java.
* Various useful typemaps.
* ----------------------------------------------------------------------------- */
/*
* char **STRING_ARRAY typemaps.