Improved C++ nested class support - nested typedef'd classes now parsed and treated as forward class declaration

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11756 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-11-23 23:02:01 +00:00
commit 2a59a2e6a9
6 changed files with 324 additions and 99 deletions

View file

@ -1,26 +1,25 @@
%module nested_comment
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) s1::n;
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) a::d;
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
// this example shows a problem with 'dump_nested' (parser.y).
// bug #949654
%inline %{
typedef struct s1 {
union {
int fsc; /* genie structure hiding - Conductor
*/
int fso; /* genie structure hiding - FSOptions
*/
struct {
double *vals;
int size;
} vector_val; /* matrix values are mainly used
in rlgc models */
char *name;
} n ;
} s2;
typedef struct s1 {
union {
int fsc; /* genie structure hiding - Conductor
*/
int fso; /* genie structure hiding - FSOptions
*/
struct {
double *vals;
int size;
} vector_val; /* matrix values are mainly used
in rlgc models */
char *name;
} n ;
} s2;
%}
// comment in nested struct