[C++-sig] py++ and templates

Jeff Winkelman winkatl1213 at yahoo.com
Thu Aug 23 21:18:34 CEST 2007


>On 8/23/07, Jeff Winkelman <winkatl1213 at yahoo.com> wrote:
>>
>> Hello,
>>
>> I am using py++ for the first time to wrap a decent sized C++ library.
>> We've been using SWIG for this library for several years and have recently
>> discovered some significant memory leaks.  I upgraded to the latest version
>> of SWIG which resulted in huge increase in compile times and no resolution
>> to the issue.
>>
>> So, I've decided to see if boost would handle the situation better.
>>
>> I am able to successfully generate a wrapper file using py++, however, some
>> of the template instances that are declared in one of the header files are
>> not exposed in the wrapper.
>>
>> I've read several suggestions on the py++ website, and even tried wrapping
>> these template instances in a pyplusplus::aliases namespace as suggested in
>> the py++ "hints" section.
>>
>> This eliminated some warnings, but didn't result in code being added for
>> these objects.
>>
>> Does anyone have an idea of why these instances are not be wrapped?
>>
>> I've included the header files I'm trying to wrap along with my py++ script
>> that I'm using.
>
>What template class(es) you try to expose?
>
>-- 
>Roman Yakovenko
>C++ Python language binding
>http://www.language-binding.net/

Roman,

They are the template instances defined in the bottom of the Easy_EImage.h file.

I'll list them here for reference:

// Predefined ROI types
typedef EROI<EBW1> EROIBW1;
typedef EROI<EBW8> EROIBW8;
typedef EROI<EBW16> EROIBW16;
typedef EROI<EBW32> EROIBW32;
typedef EROI<EC15> EROIC15;
typedef EROI<EC16> EROIC16;
typedef EROI<EC24> EROIC24;
typedef EROI<EYUY2> EROIYUY2;
typedef EROI<EC24A> EROIC24A;
typedef EROI<ESubPixel64> EROISubPixel64;
typedef EROI<EComplex64> EROIComplex64;
typedef EROI<ERaw32> EROIRaw32;
typedef EROI<ERaw96> EROIRaw96;
typedef EROI<EFLOAT32> EROIFLOAT32;
typedef EROI<EFLOAT64> EROIFLOAT64;

// Predefined image types
typedef EImage<EBW1> EImageBW1;
typedef EImage<EBW8> EImageBW8;
typedef EImage<EBW16> EImageBW16;
typedef EImage<EBW32> EImageBW32;
typedef EImage<EC15> EImageC15;
typedef EImage<EC16> EImageC16;
typedef EImage<EC24> EImageC24;
typedef EImage<EYUY2> EImageYUY2;
typedef EImage<EC24A> EImageC24A;
typedef EImage<ESubPixel64> EImageSubPixel64;
typedef EImage<EComplex64> EImageComplex64;
typedef EImage<ERaw32> EImageRaw32;
typedef EImage<ERaw96> EImageRaw96;
typedef EImage<EFLOAT32> EImageFLOAT32;
typedef EImage<EFLOAT64> EImageFLOAT64;

Jeff




       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070823/bb066c47/attachment.htm>


More information about the Cplusplus-sig mailing list