From 4c4e3f47adb34dce69f312d256cfbfb83b6ce955 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 25 May 2005 21:34:39 +0000 Subject: added missing constructors for std::pair git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7221 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/guile/std_pair.i | 24 ++++++++++++++++++++++++ Lib/java/std_pair.i | 20 ++++++++++++-------- Lib/mzscheme/std_pair.i | 24 ++++++++++++++++++++++++ Lib/ocaml/std_pair.i | 20 ++++++++++++-------- Lib/perl5/std_pair.i | 20 ++++++++++++-------- Lib/php4/std_pair.i | 20 ++++++++++++-------- Lib/ruby/std_pair.i | 24 ++++++++++++++++++++++++ Lib/std/std_pair.i | 12 ++++++------ Lib/tcl/std_pair.i | 20 ++++++++++++-------- 9 files changed, 138 insertions(+), 46 deletions(-) diff --git a/Lib/guile/std_pair.i b/Lib/guile/std_pair.i index a4babc459..1709bf3ab 100644 --- a/Lib/guile/std_pair.i +++ b/Lib/guile/std_pair.i @@ -115,6 +115,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -212,6 +218,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -307,6 +319,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -394,6 +412,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; diff --git a/Lib/java/std_pair.i b/Lib/java/std_pair.i index f34bfc512..7445348eb 100644 --- a/Lib/java/std_pair.i +++ b/Lib/java/std_pair.i @@ -16,16 +16,20 @@ #include %} -// exported class - namespace std { - template struct pair { - // add typemaps here - T first; - U second; - }; + template struct pair { + + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + + T first; + U second; + }; - // add specializations here + // add specializations here } diff --git a/Lib/mzscheme/std_pair.i b/Lib/mzscheme/std_pair.i index 7d6442235..1339780bd 100644 --- a/Lib/mzscheme/std_pair.i +++ b/Lib/mzscheme/std_pair.i @@ -116,6 +116,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -212,6 +218,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -307,6 +319,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -396,6 +414,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; diff --git a/Lib/ocaml/std_pair.i b/Lib/ocaml/std_pair.i index f34bfc512..7445348eb 100644 --- a/Lib/ocaml/std_pair.i +++ b/Lib/ocaml/std_pair.i @@ -16,16 +16,20 @@ #include %} -// exported class - namespace std { - template struct pair { - // add typemaps here - T first; - U second; - }; + template struct pair { + + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + + T first; + U second; + }; - // add specializations here + // add specializations here } diff --git a/Lib/perl5/std_pair.i b/Lib/perl5/std_pair.i index f34bfc512..488648883 100644 --- a/Lib/perl5/std_pair.i +++ b/Lib/perl5/std_pair.i @@ -16,16 +16,20 @@ #include %} -// exported class - namespace std { - template struct pair { - // add typemaps here - T first; - U second; - }; + template struct pair { + + pair(); + pair(T t, U u); + pair(const pair& p); + + template pair(const pair &p); + + T first; + U second; + }; - // add specializations here + // add specializations here } diff --git a/Lib/php4/std_pair.i b/Lib/php4/std_pair.i index f34bfc512..7445348eb 100644 --- a/Lib/php4/std_pair.i +++ b/Lib/php4/std_pair.i @@ -16,16 +16,20 @@ #include %} -// exported class - namespace std { - template struct pair { - // add typemaps here - T first; - U second; - }; + template struct pair { + + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + + T first; + U second; + }; - // add specializations here + // add specializations here } diff --git a/Lib/ruby/std_pair.i b/Lib/ruby/std_pair.i index e408a3ebc..61b388cae 100644 --- a/Lib/ruby/std_pair.i +++ b/Lib/ruby/std_pair.i @@ -135,6 +135,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -251,6 +257,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -368,6 +380,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; @@ -474,6 +492,12 @@ namespace std { $1 = 0; } } + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + T first; U second; }; diff --git a/Lib/std/std_pair.i b/Lib/std/std_pair.i index c9d8b3a1a..923221a8f 100644 --- a/Lib/std/std_pair.i +++ b/Lib/std/std_pair.i @@ -7,7 +7,7 @@ namespace std { template struct pair { - typedef T fisrt_type; + typedef T first_type; typedef U second_type; %traits_swigtype(T); @@ -30,8 +30,8 @@ namespace std { %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair); pair(); - pair(T __a, U __b); - pair(const pair& __p); + pair(T first, U second); + pair(const pair& p); template pair(const pair &p); @@ -49,7 +49,7 @@ namespace std { // simplified when a 'const SWIGTYPE*&' can be defined // *** template struct pair { - typedef T fisrt_type; + typedef T first_type; typedef U* second_type; %traits_swigtype(T); @@ -85,7 +85,7 @@ namespace std { }; template struct pair { - typedef T* fisrt_type; + typedef T* first_type; typedef U second_type; %traits_swigtype(T); @@ -121,7 +121,7 @@ namespace std { }; template struct pair { - typedef T* fisrt_type; + typedef T* first_type; typedef U* second_type; %traits_swigtype(T); diff --git a/Lib/tcl/std_pair.i b/Lib/tcl/std_pair.i index f34bfc512..7445348eb 100644 --- a/Lib/tcl/std_pair.i +++ b/Lib/tcl/std_pair.i @@ -16,16 +16,20 @@ #include %} -// exported class - namespace std { - template struct pair { - // add typemaps here - T first; - U second; - }; + template struct pair { + + pair(); + pair(T first, U second); + pair(const pair& p); + + template pair(const pair &p); + + T first; + U second; + }; - // add specializations here + // add specializations here } -- cgit v1.2.1