Quantcast

Nested C++ class not fully known.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Nested C++ class not fully known.

Chris Slominski
I am using swig 3.0.2. I generate and build C++ code for the PHP
language. I get no errors or warnings. I use a public nested class in
the C++.

The C++ outer class function returns a pointer to an instance of the
inner class; "const Dimensions * GetDimensions(void) const;". When
executed via PHP I just get a resource that, when inspected, has no methods.

resource(19) of type (_p_CED__PropVal__Dimensions)

where CED is a namespace, PropVal is the outter class, and Dimensions is
the inner class. What am I missing?


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nested C++ class not fully known.

William S Fulton


On 7 March 2017 at 17:55, Chris Slominski <[hidden email]> wrote:
I am using swig 3.0.2. I generate and build C++ code for the PHP
language. I get no errors or warnings. I use a public nested class in
the C++.

The C++ outer class function returns a pointer to an instance of the
inner class; "const Dimensions * GetDimensions(void) const;". When
executed via PHP I just get a resource that, when inspected, has no methods.

resource(19) of type (_p_CED__PropVal__Dimensions)

where CED is a namespace, PropVal is the outter class, and Dimensions is
the inner class. What am I missing?

Did you look at the warnings that SWIG generated? There may have been one for your nested class. Please take a look at the Nested Classes section in the docs: http://www.swig.org/Doc3.0/SWIGPlus.html#SWIGPlus_nested_classes.

William


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...