Csound Csound-dev Csound-tekno Search About

[Cs-dev] cenviron_ and the API

Date2012-04-25 16:35
FromTito Latini
Subject[Cs-dev] cenviron_ and the API
AttachmentsNone  

Date2012-04-25 16:55
FromTito Latini
SubjectRe: [Cs-dev] cenviron_ and the API
AttachmentsNone  

Date2012-04-25 16:57
FromTito Latini
SubjectRe: [Cs-dev] cenviron_ and the API
AttachmentsNone  None  


but the number is wrong (with or without the NULLs).
It seems 240 and not 322.

no, only 321 instead of 322



Date2012-04-25 16:59
FromVictor Lazzarini
SubjectRe: [Cs-dev] cenviron_ and the API
This is not my code, but it is supposed to initialise the Csound structure. Since csoundSetGlobalEnv() is not in it (or use CSOUND), it's not there to be initialised. So, yes these functions will be members of CSOUND, so will need to be initialised there.

About that comment, I often wondered if the number was correct.

Victor

On 25 Apr 2012, at 16:35, Tito Latini wrote:

> What is the policy for the API func in `CSOUND cenviron_' ?
> For example, I'm see that `csoundSetGlobalEnv' is out.
> 
> Do I have to add `csoundParseOrc', `csoundCompileOrc'
> and the next `csoundReadScore' at cenviron_ ?
> (removing the corresponding NULLs between { ... } after the funcs)
> 
> Besides, I have noticed the comment
> 
>  /* ----------------- interface functions (322 total) ----------------- */
> 
> but the number is wrong (with or without the NULLs).
> It seems 240 and not 322.
> 
> tito
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 17:01
FromVictor Lazzarini
SubjectRe: [Cs-dev] cenviron_ and the API
Also: in H/csound.hpp  you will need to wrap them for the C++ interface. It should be trivial to do.

Victor

On 25 Apr 2012, at 16:35, Tito Latini wrote:

> What is the policy for the API func in `CSOUND cenviron_' ?
> For example, I'm see that `csoundSetGlobalEnv' is out.
> 
> Do I have to add `csoundParseOrc', `csoundCompileOrc'
> and the next `csoundReadScore' at cenviron_ ?
> (removing the corresponding NULLs between { ... } after the funcs)
> 
> Besides, I have noticed the comment
> 
>  /* ----------------- interface functions (322 total) ----------------- */
> 
> but the number is wrong (with or without the NULLs).
> It seems 240 and not 322.
> 
> tito
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 17:09
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] cenviron_ and the API
In CS6 I was assuming th eAPI is all up for reassessment.  I deleted some
unused/useless functions from it and played with some of the fields. 
until we know what is needed it is not frozen


> yes, thanks
>
> On Wed, Apr 25, 2012 at 05:01:15PM +0100, Victor Lazzarini wrote:
>> Also: in H/csound.hpp  you will need to wrap them for the C++ interface.
>> It should be trivial to do.
>>
>> Victor
>>
>> On 25 Apr 2012, at 16:35, Tito Latini wrote:
>>
>> > What is the policy for the API func in `CSOUND cenviron_' ?
>> > For example, I'm see that `csoundSetGlobalEnv' is out.
>> >
>> > Do I have to add `csoundParseOrc', `csoundCompileOrc'
>> > and the next `csoundReadScore' at cenviron_ ?
>> > (removing the corresponding NULLs between { ... } after the funcs)
>> >
>> > Besides, I have noticed the comment
>> >
>> >  /* ----------------- interface functions (322 total)
>> ----------------- */
>> >
>> > but the number is wrong (with or without the NULLs).
>> > It seems 240 and not 322.
>> >
>> > tito
>> >
>> > ------------------------------------------------------------------------------
>> > Live Security Virtual Conference
>> > Exclusive live event will cover all the ways today's security and
>> > threat landscape has changed and how IT managers can respond.
>> Discussions
>> > will include endpoint security, mobile security and the latest in
>> malware
>> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond.
>> Discussions
>> will include endpoint security, mobile security and the latest in
>> malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 17:20
FromVictor Lazzarini
SubjectRe: [Cs-dev] cenviron_ and the API
Definitely.

Victor
On 25 Apr 2012, at 17:09, jpff@cs.bath.ac.uk wrote:

> In CS6 I was assuming th eAPI is all up for reassessment.  I deleted some
> unused/useless functions from it and played with some of the fields. 
> until we know what is needed it is not frozen
> 
> 
>> yes, thanks
>> 
>> On Wed, Apr 25, 2012 at 05:01:15PM +0100, Victor Lazzarini wrote:
>>> Also: in H/csound.hpp  you will need to wrap them for the C++ interface.
>>> It should be trivial to do.
>>> 
>>> Victor
>>> 
>>> On 25 Apr 2012, at 16:35, Tito Latini wrote:
>>> 
>>>> What is the policy for the API func in `CSOUND cenviron_' ?
>>>> For example, I'm see that `csoundSetGlobalEnv' is out.
>>>> 
>>>> Do I have to add `csoundParseOrc', `csoundCompileOrc'
>>>> and the next `csoundReadScore' at cenviron_ ?
>>>> (removing the corresponding NULLs between { ... } after the funcs)
>>>> 
>>>> Besides, I have noticed the comment
>>>> 
>>>> /* ----------------- interface functions (322 total)
>>> ----------------- */
>>>> 
>>>> but the number is wrong (with or without the NULLs).
>>>> It seems 240 and not 322.
>>>> 
>>>> tito
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond.
>>> Discussions
>>>> will include endpoint security, mobile security and the latest in
>>> malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> Dept. of Music
>>> NUI Maynooth Ireland
>>> tel.: +353 1 708 3545
>>> Victor dot Lazzarini AT nuim dot ie
>>> 
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond.
>>> Discussions
>>> will include endpoint security, mobile security and the latest in
>>> malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 21:53
FromMichael Gogins
SubjectRe: [Cs-dev] cenviron_ and the API
For Csound 6, the API should be refactored and reconsidered. In
particular, instead of individual function pointer members, it should
have one pointer to a table of function pointers, i.e. a proper
virtual function table like a C++ class.

I think such a refactoring should come early in Csound 6 development,
and be ongoing.

Regards,
Mike

On Wed, Apr 25, 2012 at 12:20 PM, Victor Lazzarini
 wrote:
> Definitely.
>
> Victor
> On 25 Apr 2012, at 17:09, jpff@cs.bath.ac.uk wrote:
>
>> In CS6 I was assuming th eAPI is all up for reassessment.  I deleted some
>> unused/useless functions from it and played with some of the fields.
>> until we know what is needed it is not frozen
>>
>>
>>> yes, thanks
>>>
>>> On Wed, Apr 25, 2012 at 05:01:15PM +0100, Victor Lazzarini wrote:
>>>> Also: in H/csound.hpp  you will need to wrap them for the C++ interface.
>>>> It should be trivial to do.
>>>>
>>>> Victor
>>>>
>>>> On 25 Apr 2012, at 16:35, Tito Latini wrote:
>>>>
>>>>> What is the policy for the API func in `CSOUND cenviron_' ?
>>>>> For example, I'm see that `csoundSetGlobalEnv' is out.
>>>>>
>>>>> Do I have to add `csoundParseOrc', `csoundCompileOrc'
>>>>> and the next `csoundReadScore' at cenviron_ ?
>>>>> (removing the corresponding NULLs between { ... } after the funcs)
>>>>>
>>>>> Besides, I have noticed the comment
>>>>>
>>>>> /* ----------------- interface functions (322 total)
>>>> ----------------- */
>>>>>
>>>>> but the number is wrong (with or without the NULLs).
>>>>> It seems 240 and not 322.
>>>>>
>>>>> tito
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Live Security Virtual Conference
>>>>> Exclusive live event will cover all the ways today's security and
>>>>> threat landscape has changed and how IT managers can respond.
>>>> Discussions
>>>>> will include endpoint security, mobile security and the latest in
>>>> malware
>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>> Dr Victor Lazzarini
>>>> Senior Lecturer
>>>> Dept. of Music
>>>> NUI Maynooth Ireland
>>>> tel.: +353 1 708 3545
>>>> Victor dot Lazzarini AT nuim dot ie
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond.
>>>> Discussions
>>>> will include endpoint security, mobile security and the latest in
>>>> malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 21:59
FromFelipe Sateler
SubjectRe: [Cs-dev] cenviron_ and the API
On Wed, Apr 25, 2012 at 17:53, Michael Gogins  wrote:
> Csound 6, the API should be refactored and reconsidered. In
> particular, instead of individual function pointer members, it should
> have one pointer to a table of function pointers, i.e. a proper
> virtual function table like a C++ class

Pardon my ignorance, but what purpose does the csound function pointer
list fulfill?

-- 

Saludos,
Felipe Sateler

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 22:08
FromMichael Gogins
SubjectRe: [Cs-dev] cenviron_ and the API
I doubt you are ignorant, but anyway...

(1) Makes it easier to maintain backwards compatibility of the Csound
structure. There is no need to use padding. New data members are added
at the end of the structure, and new API function pointers are added
at the end of the vtable.

(2) For the same reason, makes it easier to maintain the code for the
Csound structure and the factory functions.

(3) The Csound API could be made into a perfect COM object by
including an AddRef and Release member. There would be the same binary
 layout for both the C Csound API and the COM interface.

(4) Ditto for a C++ interface. It would have the same binary layout, A
factory returning a Csound class pointer could in fact be returning a
Csound structure pointer.

(5) Similarly, if Csound were actually implemented in C++ rather than
in C, a factory returning a Csound struct pointer could in fact be
returning a Csound class pointer.

Regards,
Mike


On Wed, Apr 25, 2012 at 4:59 PM, Felipe Sateler  wrote:
> On Wed, Apr 25, 2012 at 17:53, Michael Gogins  wrote:
>> Csound 6, the API should be refactored and reconsidered. In
>> particular, instead of individual function pointer members, it should
>> have one pointer to a table of function pointers, i.e. a proper
>> virtual function table like a C++ class
>
> Pardon my ignorance, but what purpose does the csound function pointer
> list fulfill?(
>
> --
>
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-25 22:41
FromFelipe Sateler
SubjectRe: [Cs-dev] cenviron_ and the API
This is not really the question I asked. I agree that, given that a
list of functions is stored, it is better to store them at a separate
structure. Let me rephrase: Why does the CSOUND object need to contain
(a pointer to) a list of API functions?

On Wed, Apr 25, 2012 at 18:08, Michael Gogins  wrote:
> I doubt you are ignorant, but anyway...
>
> (1) Makes it easier to maintain backwards compatibility of the Csound
> structure. There is no need to use padding. New data members are added
> at the end of the structure, and new API function pointers are added
> at the end of the vtable.
>
> (2) For the same reason, makes it easier to maintain the code for the
> Csound structure and the factory functions.
>
> (3) The Csound API could be made into a perfect COM object by
> including an AddRef and Release member. There would be the same binary
>  layout for both the C Csound API and the COM interface.
>
> (4) Ditto for a C++ interface. It would have the same binary layout, A
> factory returning a Csound class pointer could in fact be returning a
> Csound structure pointer.
>
> (5) Similarly, if Csound were actually implemented in C++ rather than
> in C, a factory returning a Csound struct pointer could in fact be
> returning a Csound class pointer.
>
> Regards,
> Mike
>
>
> On Wed, Apr 25, 2012 at 4:59 PM, Felipe Sateler  wrote:
>> On Wed, Apr 25, 2012 at 17:53, Michael Gogins  wrote:
>>> Csound 6, the API should be refactored and reconsidered. In
>>> particular, instead of individual function pointer members, it should
>>> have one pointer to a table of function pointers, i.e. a proper
>>> virtual function table like a C++ class
>>
>> Pardon my ignorance, but what purpose does the csound function pointer
>> list fulfill?(
>>
>> --
>>
>> Saludos,
>> Felipe Sateler
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-- 

Saludos,
Felipe Sateler

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https

Date2012-04-27 22:46
FromRichard Dobson
SubjectRe: [Cs-dev] cenviron_ and the API
On 25/04/2012 22:41, Felipe Sateler wrote:
> This is not really the question I asked. I agree that, given that a
> list of functions is stored, it is better to store them at a separate
> structure. Let me rephrase: Why does the CSOUND object need to contain
> (a pointer to) a list of API functions?
>

A similarly interesting question is why the CSOUND object contains such 
a huge (and possibly expanding?) list of data fields.

I had suggested some while back using just ~one~ API function called 
QueryInterface "or something" (since Michael refers to the COM model, 
indeed), where you ask for whichever pointer you want, using an integer 
(possibly GUID-style) ident. That way, the Csound structure itself would 
not have to be extended with new elements every time a new function was 
added to the API.  Actually, it is not the same as COM, as 
QueryInterface there is used to obtain pointers to classes (or class 
factories), whereas all we need (AFAIK) is a function pointer. It's not 
type safe, but QueryInterface is not type-safe in COM either.



Richard Dobson



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net