On Mon, Jul 20, 2009 at 03:29:56PM +0100, Rochel, Alban wrote:
> Hello all,
> 
> Due to the issues related to dynamic_casts, and as those were only used to 
> make the code compacter, I`ve changed the way the driver works as follows:
> - Before: 1 callback function common to all Qt devices (e.g. plD_line_qt), 
> calling the proper implementations making tests on the results of 
> dynamic_casts
> - After: 1 callback function for every Qt device (e.g. plD_line_svgqt), using 
> simple C-style casts. If you prefer C++ reinterpret_casts, just ask.
> This is by far the simplest solution I can think about.
> 
> If this suits your needs, I will then proceed with other updates later.
> 
> While I`m working on this, Dmitri Gribenko complained about the fact that all 
> the class definitions were bulked in one header, which is not conventional in 
> C++, but is functional and avoids having many header files for a single 
> driver. I can change that of course, I just want an official green light for 
> this, as it remained as the state of a discussion.

Dear Alban,

As an aside, make sure you get the latest update. I've been looking at 
fixing the qt visibility issues today and have made a few changes as
a result. 

Looking at the code I only see 2 versions of all the callback functions 
a standard one and an extended one for extqt and qtwidget. Is this
correct? If so, then it is not a large increase in code size to 
remove the dynamic casting if it is problematic. 

In terms of splitting up qt.h into lots of class specific files, I know
this is the normal C++ way of doing things, but this will generate a 
lot of extra headers for just 1 driver. I think the clutter this
makes will outway any C++ elegance benefits. That's my opinion. Others
may disagree.

Slightly off topic - I've now got gcc -fvisibility=hidden working with
the qt driver and with the C++ qt_example.cpp. It does not work with 
the pyqt4 bindings yet. There are a couple of issues here (I think). 
1) The sip generated code does not export the symbols that python
requires. It should be possible to massage the source code if required.
2) The moc generated code for qt also is not visibility aware and I 
think this is what is leading to the missing symbols in plplot_pyqt4.so
at the moment. I've not yet worked out how (or indeed even if it is
possible) to massage the code by hand to "fix" this.

Andrew

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to