| I don't think WINE is guaranteed to be a fair test. Only testing on actual Windows can definitively answer this question.
Why do you want to remove the "virtual" declaration, anyway?
In addition to making sure things work on Windows, it also allows the methods to be overridden in derived classes. This could have definite applications. In fact, I am considering creating default callback handler virtual methods that normally just forward to the existing callbacks, but can be overridden in classes derived in Python or Java. This would provide the simplest method of implementing callbacks in the interface languages, at least where SWIG has "directors".
Regards,
Mike
-----Original Message-----
From: Istvan Varga
Sent: Dec 9, 2005 9:17 AM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] csound.hpp
On Wednesday 07 December 2005 17:32, Michael Gogins wrote:
> I suspect the reason CsoundVST needs the virtual table is that it
> dynamically loads the library containing CppSound using LoadLibrary. The
> virtual function addresses are just offsets from the vtbl address, which is
> the same as the instance address. So the operating system does not need to
> fix up the function addresses.
>
> Also, did it work on both Windows and Linux for you?
I have now tested a Win32 build under WINE, and the Csound class seems
to work fine in Python (at least with the simple test I did, that is,
creating an argument list, and compiling and performing a CSD file),
even though all uses of 'virtual' were removed from csound.hpp in the
test sources. I also tried the Trapped.py example which uses CppSound,
and it was OK too.
Of course, it may be possible that the untested cases of running under
native Windows or using Java would not work for some unknown reason,
but so far I have not run into problems. Thus, the requirement for
virtual methods might be limited to the Csound class (which is used by
CsoundVST), probably not including the condititionally compiled glue
functions for polling messages that are only intended for use from the
SWIG wrappers but not a C++ host.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |