std::map example

Ayman Habib <[email protected]> Sat, 27 Mar 2021 10:03:58 -0700
Newsgroups gmane.comp.programming.swig
Message-ID <CAFkhwKsNdb7=W6HkqyKLjmPnG1Xvea4TH+_kHXFer_k42WxaWA@mail.gmail.com>
Hi all,

I'm trying to upgrade the language bindings for our library (Java and
Python) from swig  version 3.0.9 to 4.0.2 but I'm running into problem that
the generated Java code doesn't compile for a C++ class that is a subclass
of std::map<std::string, shared_ptr<SomeComplicatedClass>>.

The generated Java class has the correct class hierarchy ( now a
subclass of  java.util.AbstractMap<String, SomeComplicatedClass >) but the
generated Java class fails to compile because the methods internally refer
to the Iterator methods that have wrong signatures. Is there an example of
how to generate bindings for a subclass of std::map in Java and Python?

I could take over the offending methods and replace them with ones that
compile and work by modifying the interface file(s) but I'd prefer to use
swig's native mechanisms if possible.

Thank you for your help,
-Ayman

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user