From: William S F. <ws...@fu...> - 2013-10-22 18:33:40
|
SWIG attempts to reflect the wrapped C++ interface into the target language. If you don't want this, then change your interface file to suite. Did you try %ignore on the base? SWIG might still need the appropriate type information in order for %ignore to work. William On 22/10/13 05:45, Chris Dembia wrote: > Thank you. What if I want to also don't want to wrap SimTK::ArrayView (the > users of the wrapping would never want to instantiate this)? > > > On Mon, Oct 21, 2013 at 12:49 PM, William S Fulton > <ws...@fu...>wrote: > >> On 20/10/13 23:19, Chris Dembia wrote: >> >>> In the case that I am using a base class that is a template, but I do not >>> want to wrap that template base class, the SWIG docs say to do something >>> like the following: >>> >>> %template() traits<double,double>; >>> >>> which it calls empty template instantiation. >>> >>> This is exactly what I was looking for, but using this gives me 2 >>> warnings: >>> >>> Warning 401: Base class 'SimTK::ArrayView_< SimTK::DecorativeGeometry >' >>> has no name as it is an empty template instantiated with '%template()'. >>> Ignored. >>> Warning 401: The %template directive must be written before >>> 'SimTK::ArrayView_< SimTK::DecorativeGeometry >' is used as a base class >>> and be declared with a name. >>> >>> The reason I wanted to use template() in the first place was to get rid of >>> warnings. So am I doing something, or is the warning being generated for >>> an >>> expected use-case? >>> >>> If SimTK::ArrayView is being used as a base class, then you should give >> it a name in the %template and you should have the %template before it is >> used as a base. >> >> William >> >> > |