Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1148)

Unified Diff: swig/Lib/std/std_pair.i

Issue 553095: Checkin swig binaries for win, linux and Mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « swig/Lib/std/std_multiset.i ('k') | swig/Lib/std/std_queue.i » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: swig/Lib/std/std_pair.i
===================================================================
--- swig/Lib/std/std_pair.i (revision 0)
+++ swig/Lib/std/std_pair.i (revision 0)
@@ -0,0 +1,163 @@
+%include <std_common.i>
+
+%{
+#include <utility>
+%}
+
+
+namespace std {
+ template <class T, class U > struct pair {
+ typedef T first_type;
+ typedef U second_type;
+
+ %traits_swigtype(T);
+ %traits_swigtype(U);
+
+ %fragment(SWIG_Traits_frag(std::pair<T,U >), "header",
+ fragment=SWIG_Traits_frag(T),
+ fragment=SWIG_Traits_frag(U),
+ fragment="StdPairTraits") {
+ namespace swig {
+ template <> struct traits<std::pair<T,U > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::pair<" #T "," #U " >";
+ }
+ };
+ }
+ }
+
+#ifndef SWIG_STD_PAIR_ASVAL
+ %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T,U >);
+#else
+ %typemap_traits(SWIG_TYPECHECK_PAIR, std::pair<T,U >);
+#endif
+
+ pair();
+ pair(T first, U second);
+ pair(const pair& p);
+
+ template <class U1, class U2> pair(const pair<U1, U2> &p);
+
+ T first;
+ U second;
+
+#ifdef %swig_pair_methods
+ // Add swig/language extra methods
+ %swig_pair_methods(std::pair<T,U >)
+#endif
+ };
+
+ // ***
+ // The following specializations should dissapear or get
+ // simplified when a 'const SWIGTYPE*&' can be defined
+ // ***
+ template <class T, class U > struct pair<T, U*> {
+ typedef T first_type;
+ typedef U* second_type;
+
+ %traits_swigtype(T);
+ %traits_swigtype(U);
+
+ %fragment(SWIG_Traits_frag(std::pair<T,U* >), "header",
+ fragment=SWIG_Traits_frag(T),
+ fragment=SWIG_Traits_frag(U),
+ fragment="StdPairTraits") {
+ namespace swig {
+ template <> struct traits<std::pair<T,U* > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::pair<" #T "," #U " * >";
+ }
+ };
+ }
+ }
+
+ %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T,U* >);
+
+ pair();
+ pair(T __a, U* __b);
+ pair(const pair& __p);
+
+ T first;
+ U* second;
+
+#ifdef %swig_pair_methods
+ // Add swig/language extra methods
+ %swig_pair_methods(std::pair<T,U*>)
+#endif
+ };
+
+ template <class T, class U > struct pair<T*, U> {
+ typedef T* first_type;
+ typedef U second_type;
+
+ %traits_swigtype(T);
+ %traits_swigtype(U);
+
+ %fragment(SWIG_Traits_frag(std::pair<T*,U >), "header",
+ fragment=SWIG_Traits_frag(T),
+ fragment=SWIG_Traits_frag(U),
+ fragment="StdPairTraits") {
+ namespace swig {
+ template <> struct traits<std::pair<T*,U > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::pair<" #T " *," #U " >";
+ }
+ };
+ }
+ }
+
+ %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T*,U >);
+
+ pair();
+ pair(T* __a, U __b);
+ pair(const pair& __p);
+
+ T* first;
+ U second;
+
+#ifdef %swig_pair_methods
+ // Add swig/language extra methods
+ %swig_pair_methods(std::pair<T*,U >)
+#endif
+ };
+
+ template <class T, class U > struct pair<T*, U*> {
+ typedef T* first_type;
+ typedef U* second_type;
+
+ %traits_swigtype(T);
+ %traits_swigtype(U);
+
+ %fragment(SWIG_Traits_frag(std::pair<T*,U* >), "header",
+ fragment=SWIG_Traits_frag(T),
+ fragment=SWIG_Traits_frag(U),
+ fragment="StdPairTraits") {
+ namespace swig {
+ template <> struct traits<std::pair<T*,U* > > {
+ typedef pointer_category category;
+ static const char* type_name() {
+ return "std::pair<" #T " *," #U " * >";
+ }
+ };
+ }
+ }
+
+ %typemap_traits(SWIG_TYPECHECK_PAIR, std::pair<T*,U* >);
+
+ pair();
+ pair(T* __a, U* __b);
+ pair(const pair& __p);
+
+ T* first;
+ U* second;
+
+#ifdef %swig_pair_methods
+ // Add swig/language extra methods
+ %swig_pair_methods(std::pair<T*,U*>)
+#endif
+ };
+
+}
« no previous file with comments | « swig/Lib/std/std_multiset.i ('k') | swig/Lib/std/std_queue.i » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698