Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] C++ Wrapper

Date2005-10-28 03:00
From"Michael Gogins"
SubjectRe: [Cs-dev] C++ Wrapper
As usual Istvan commits his code without much discussion.

However, I suspect the purpose here is to provide a "pure header file" that 
provides a C++ interface to the existing Csound "C" API library, without 
needing a C++ source file that would need to be compiled into the Csound 
library. All the C++ functions are defined "inline" right in the header 
file.

This is a neat idea. It makes the Csound library usable directly from C++ 
without actually having to compile any C++ code into the library.

SWIG should also work with this C++ header file the same way, and the 
compiler should inline the required C++ glue code automatically.

That is fine as far as the existing API goes, but it omits functions that I 
am contributing to Csound  for working with Csound files and controlling 
performances with embedded Csound. The file handling code in particular is 
fairly extensive and normally would go into a .cpp file to be compiled into 
a library.

C++ is a much better choice for the file handling code than C, so I am not 
about to translate it to C. That leaves me the choice of turning the file 
handling code into pure inline headers in the same way, or leaving it in a 
separate C++ shared library.

I am going to move a few things for performance control from my CppSound 
class to Istvan's Csound class to make it more usable in embedded Csound.

I am not sure whether to leave the CsoundFile class in a separate library as 
it now is, or to inline all of that code as well.

Regards,
Mike

----- Original Message ----- 
From: "Steven Yi" 
To: "Csound-dev" 
Sent: Thursday, October 27, 2005 4:45 PM
Subject: [Cs-dev] C++ Wrapper


Hi All,

I had started to do work on a python auto wrapping utility script but
I see now that both Michael is updating CppSound.cpp/CppSound.hpp and
Istvan is working on a csound.hpp.  At this point, I'm thinking I
should remove the cppgen.py script and stop working on it (not much
work on it anyways so not much lost); I'm just wondering now what C++
header is going to be the "canonical" one?

Thanks,
steven


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net