From c188bc31a00da44bfe074e16c65fb7cd90fd9283 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 7 Mar 2006 00:21:51 +0000 Subject: [PATCH] Common template for head of each file detailing licence, distribution and authors information git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8974 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/csharp/csharp.swg | 5 ++++- SWIG/Lib/csharp/csharphead.swg | 5 ++++- SWIG/Lib/csharp/csharpkw.swg | 8 ++++---- SWIG/Lib/csharp/enums.swg | 5 +++++ SWIG/Lib/csharp/enumsimple.swg | 5 +++++ SWIG/Lib/csharp/enumtypesafe.swg | 5 +++++ SWIG/Lib/csharp/std_except.i | 13 ++++++++++--- SWIG/Lib/csharp/std_map.i | 14 ++++++++------ SWIG/Lib/csharp/std_pair.i | 14 ++++++++------ SWIG/Lib/csharp/std_string.i | 27 +++++++++++++-------------- SWIG/Lib/csharp/std_vector.i | 14 ++++++++++---- SWIG/Lib/csharp/stl.i | 10 +++++++++- SWIG/Lib/csharp/typemaps.i | 22 +++++++++++----------- SWIG/Lib/modula3/modula3.swg | 3 +++ SWIG/Lib/modula3/modula3head.swg | 3 +++ SWIG/Lib/modula3/typemaps.i | 11 +++++++++++ 16 files changed, 113 insertions(+), 51 deletions(-) diff --git a/SWIG/Lib/csharp/csharp.swg b/SWIG/Lib/csharp/csharp.swg index 0b12245d3..f968637d5 100644 --- a/SWIG/Lib/csharp/csharp.swg +++ b/SWIG/Lib/csharp/csharp.swg @@ -1,7 +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. + * * csharp.swg * - * CSharp typemaps + * C# typemaps * ----------------------------------------------------------------------------- */ %include diff --git a/SWIG/Lib/csharp/csharphead.swg b/SWIG/Lib/csharp/csharphead.swg index a4b2fa34c..d0ad52551 100644 --- a/SWIG/Lib/csharp/csharphead.swg +++ b/SWIG/Lib/csharp/csharphead.swg @@ -1,7 +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. + * * csharphead.swg * - * CSharp support code + * C# support code * ----------------------------------------------------------------------------- */ %insert(runtime) %{ diff --git a/SWIG/Lib/csharp/csharpkw.swg b/SWIG/Lib/csharp/csharpkw.swg index 7b77e11e7..c96042d2d 100644 --- a/SWIG/Lib/csharp/csharpkw.swg +++ b/SWIG/Lib/csharp/csharpkw.swg @@ -1,7 +1,7 @@ -#ifndef __csharp_csharpkw_swg__ -#define __csharp_csharpkw_swg__ +#ifndef CSHARP_CSHARPKW_SWG_ +#define CSHARP_CSHARPKW_SWG_ -/* Warnings for Csharp keywords */ +/* Warnings for C# keywords */ #define CSHARPKW(x) %namewarn("314:" #x " is a csharp keyword") #x /* @@ -91,4 +91,4 @@ CSHARPKW(while); #undef CSHARPKW -#endif //__csharp_csharpkw_swg__ +#endif //CSHARP_CSHARPKW_SWG_ diff --git a/SWIG/Lib/csharp/enums.swg b/SWIG/Lib/csharp/enums.swg index 013c23a42..9de377ca4 100644 --- a/SWIG/Lib/csharp/enums.swg +++ b/SWIG/Lib/csharp/enums.swg @@ -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 C# enums. * Note that the PINVOKE layer handles the enum as an int. * ----------------------------------------------------------------------------- */ diff --git a/SWIG/Lib/csharp/enumsimple.swg b/SWIG/Lib/csharp/enumsimple.swg index 4350d9d22..c93bcdd3f 100644 --- a/SWIG/Lib/csharp/enumsimple.swg +++ b/SWIG/Lib/csharp/enumsimple.swg @@ -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. Enums declared within a C++ class were wrapped by constant integers diff --git a/SWIG/Lib/csharp/enumtypesafe.swg b/SWIG/Lib/csharp/enumtypesafe.swg index 55a9e2ce2..f06cd37e0 100644 --- a/SWIG/Lib/csharp/enumtypesafe.swg +++ b/SWIG/Lib/csharp/enumtypesafe.swg @@ -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 C# class named after the * enum and each enum item is a static instance of this class. diff --git a/SWIG/Lib/csharp/std_except.i b/SWIG/Lib/csharp/std_except.i index 14d9f20f4..c86e97a54 100644 --- a/SWIG/Lib/csharp/std_except.i +++ b/SWIG/Lib/csharp/std_except.i @@ -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 diff --git a/SWIG/Lib/csharp/std_map.i b/SWIG/Lib/csharp/std_map.i index 006a62efd..c35f21dc7 100644 --- a/SWIG/Lib/csharp/std_map.i +++ b/SWIG/Lib/csharp/std_map.i @@ -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 diff --git a/SWIG/Lib/csharp/std_pair.i b/SWIG/Lib/csharp/std_pair.i index bff9c91b0..78142ffa6 100644 --- a/SWIG/Lib/csharp/std_pair.i +++ b/SWIG/Lib/csharp/std_pair.i @@ -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 %include diff --git a/SWIG/Lib/csharp/std_string.i b/SWIG/Lib/csharp/std_string.i index 48957559e..7d554c925 100644 --- a/SWIG/Lib/csharp/std_string.i +++ b/SWIG/Lib/csharp/std_string.i @@ -1,17 +1,16 @@ -// -// SWIG typemaps for std::string -// William Fulton -// -// C# implementation -// -/* ------------------------------------------------------------------------ - Typemaps for std::string and const std::string& - These are mapped to a C# 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 C# 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 &}; + * ----------------------------------------------------------------------------- */ %{ #include diff --git a/SWIG/Lib/csharp/std_vector.i b/SWIG/Lib/csharp/std_vector.i index d18ff6504..5e2b1c284 100755 --- a/SWIG/Lib/csharp/std_vector.i +++ b/SWIG/Lib/csharp/std_vector.i @@ -1,6 +1,9 @@ -// Warning: Use the typemaps here in the expectation that the macros they are in will change name. - -/* +/* ----------------------------------------------------------------------------- + * 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 + * * SWIG typemaps for std::vector * C# implementation * The C# wrapper is made to look and feel like a typesafe C# System.Collections.ArrayList @@ -12,7 +15,10 @@ * * SWIG_STD_VECTOR_SPECIALIZE_MINIMUM(Klass, SomeNamespace::Klass) * %template(VectKlass) std::vector; - */ + * ----------------------------------------------------------------------------- */ + +// Warning: Use the typemaps here in the expectation that the macros they are in will change name. + %include diff --git a/SWIG/Lib/csharp/stl.i b/SWIG/Lib/csharp/stl.i index a3566db5c..66b72e073 100644 --- a/SWIG/Lib/csharp/stl.i +++ b/SWIG/Lib/csharp/stl.i @@ -1,4 +1,12 @@ -/* 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 + * + * Initial STL definition. extended as needed in each language + * ----------------------------------------------------------------------------- */ + %include %include %include diff --git a/SWIG/Lib/csharp/typemaps.i b/SWIG/Lib/csharp/typemaps.i index 590472b68..2ddd9d84d 100644 --- a/SWIG/Lib/csharp/typemaps.i +++ b/SWIG/Lib/csharp/typemaps.i @@ -1,14 +1,14 @@ -// -// SWIG Typemap library -// C# 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 + * + * Pointer and reference handling typemap library + * + * These mappings provide support for input/output arguments and common + * uses for C/C++ pointers and C++ references. + * ----------------------------------------------------------------------------- */ /* INPUT typemaps diff --git a/SWIG/Lib/modula3/modula3.swg b/SWIG/Lib/modula3/modula3.swg index c3f30d2ee..683b72167 100644 --- a/SWIG/Lib/modula3/modula3.swg +++ b/SWIG/Lib/modula3/modula3.swg @@ -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. + * * modula3.swg * * Modula3 typemaps diff --git a/SWIG/Lib/modula3/modula3head.swg b/SWIG/Lib/modula3/modula3head.swg index af96a78d1..b2426be5f 100644 --- a/SWIG/Lib/modula3/modula3head.swg +++ b/SWIG/Lib/modula3/modula3head.swg @@ -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. + * * modula3head.swg * * Modula3 support code diff --git a/SWIG/Lib/modula3/typemaps.i b/SWIG/Lib/modula3/typemaps.i index 2f7ded594..79ddfda0f 100644 --- a/SWIG/Lib/modula3/typemaps.i +++ b/SWIG/Lib/modula3/typemaps.i @@ -1,3 +1,14 @@ +/* ----------------------------------------------------------------------------- + * 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 + * + * Pointer and reference handling typemap library + * + * These mappings provide support for input/output arguments and common + * uses for C/C++ pointers and C++ references. + * ----------------------------------------------------------------------------- */ /* These typemaps will eventually probably maybe make their way into named typemaps * OUTPUT * and OUTPUT & as they currently break functions that return a pointer or