[cable] Re: cswig/python inheritance
Brad King
brad.king at kitware.com
Wed Feb 25 08:52:03 EST 2004
Kaben Nanlohy wrote:
> Kitware developers :
>
> I hope that you enjoy your new offices.
>
> ***
>
> Regarding lack of inheritance information
> in wrappers generated by gccxml/cableswig :
>
> In the the function void CableSwig::FindWrappedBases() defined
> in file Insight/Utilities/CableSwig/Executables/CableSwig.cxx,
> a call is made to bool CableSwig::FindClassGroup() in such a
> way that FindClassGroup() always returns false, and guarantees
> that no wrapped base classes will be identified. Here is a patch
> containing a fix.
>
>
> --- CableSwig.cxx.orig Tue Feb 24 22:49:56 2004
> +++ CableSwig.cxx Tue Feb 24 22:53:58 2004
> @@ -486,7 +486,14 @@
> for( std::vector<cable::Class*>::iterator i = parents.begin();
> i != parents.end(); ++i)
> {
> - if(this->FindClassGroup((*i)->GetQualifiedName().c_str()))
> + // below, if CableSwig::FindClassGroup() is not passed a pointer to
> + // std::string dummy_group then it will always return false, and
> + // wrapped base classes will not be identified. dummy_group is
> + // otherwise unused.
> + //
> + // k. nanlohy -- 2004 Feb 24
> + std::string dummy_group;
> + if(this->FindClassGroup((*i)->GetQualifiedName().c_str()), &dummy_group)
> {
> ::String* s= NewStringf("%s", this->TemplateName((*i)->GetQualifiedName().c_str()).c_str());
> Append(bases,s);
Excellent. Thanks for finding this. I've committed the fix with credit
to you in the CVS log.
-Brad
More information about the cable
mailing list