From 7fa5ca10e08f9a5fed85e5b23f66954bddd7d70e Mon Sep 17 00:00:00 2001 From: Luigi Ballabio Date: Thu, 12 Jun 2003 07:19:54 +0000 Subject: [PATCH] Proposal for nested typemaps added git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4891 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- TODO | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/TODO b/TODO index 6f19889be..42fa74c8a 100644 --- a/TODO +++ b/TODO @@ -62,6 +62,41 @@ defer ready to go. The primary obstacle lies in the target language **** Implement "throws" typemaps for all of the target languages. Partly implemented for Tcl, Perl, Python, Ruby, Java. +*** "Nested" typemaps. The basic idea is similar to allowing one to + use $descriptor(T) for any T, rather than just $descriptor + for the type currently being typemapped. + + In short (ha!), given a previously defined typemap: + + %typemap(in) Foo { + // whatever it takes to initialize $1 from $input + } + + it would be possible to inline its code inside another typemap. + While the syntax is still to be defined, the use would be + along the lines of: + + template class vector { + %typemap(in) vector { + ... + for (int i=0; i