From: William S Fulton <wsf@fu...> - 2009-12-01 19:50:39
Anyone watching the svn commits would have noticed some commits I've
made for nested classes. I havn't intended to add in nested class
support, this is too large a task, but I have simply improved matters so
that header files containing nested classes are no longer a show stopper.
The improvements are now:
- Remove syntax errors parsing nested classes mainly for C++ but also
some C code. No doubt there are some obscure cases that don't parse, but
I can't think of any more. If anyone has examples of nested classes that
still result in syntax errors, let me know.
- C nested class support pretty much as it was but C++ nested class
support now results in code that will always compile, including nested
class templates. The resulting code is not necessarily particularly
useful from a target language, but the goal is to give code that will
always compile as first priority, like other areas in SWIG.
- It is possible now possible to generate code for C++ nested classes
that is genuinely useful, given some additional user input, but it still
comes with limitations. This is via the "nestedworkaround" feature.
- Nested class warnings can be suppressed for individual classes, via
%warnfilter, previously they could only be disabled individually.
- The above should mean that it is no longer necessary to modify header
files containing nested classes.
- Updated html documentation describing above - viewable here:
The CHANGES.current file contains details of all the improvements. I
don't intend to improve this any more, I've plenty more fish to fry, but
clearly it can be improved further for anyone wishing to do so. In
particular another workaround feature might feed C++ nested classes back
into the scanner much like it does with C nested classes, thereby
improving the nestedworkaround feature slightly. Of course, a volunteer
to add in full nested class support will be most welcome.