From saveez at hotmail.com  Thu Apr 21 23:04:54 2005
From: saveez at hotmail.com (Ali -)
Date: Thu Apr 21 23:05:02 2005
Subject: [Rd] Overloading methods in R
In-Reply-To: <4267FACC.9050001@blackmesacapital.com>
Message-ID: <BAY17-F69C404BCA375CB5704ABCD12C0@phx.gbl>


>>
>>- How to overload methods in classes created by R.oo package?
>[snip]
>
>Maybe you missed it in the flurry of messages, but did the idea suggested 
>by Gabor Grothendick not suit your needs?

I had to abstract the question in a setntence this time to prevent it to be 
missed again 'in the flurry of messages'.

Gabor Grothendick's example does work for S3 and your own example does work 
for S4 but none of them answer the problem I declared a few times. Both 
examples work fine for an 'specific' case. I am looking for a general 
solution to use it with a parser as part of an automatic  wrapper.

When wrapping some arbitrary C++ classes, we don't know

- how many functions are overloaded in a class
- how many arguments each function has
- what class is each argument of each function

Implementing the wrapper in the way that you and Gabor Grothendick suggest 
requires a lot of 'if' and 'missing' making it too elaborated.

Now if anyone has any elegant solutions for some 'automatic' implementation 
of overloaded methods in R, I am open to suggestions.


[Rd] Overloading methods in R
Ali -