Skip to content
Back to formatted view

Raw Message

Message-ID: <20028.8239.41691.863483@max.nulle.part>
Date: 2011-08-05T16:54:07Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] Overloaded constructors?
In-Reply-To: <7626BB9D-4489-4DF3-9A57-DBF9466B596F@frias.uni-freiburg.de>

On 5 August 2011 at 12:06, Sebastian Weber wrote:
| Hi!
| 
| I recently learned how to deal with overlaoded functions when I wanna wrap
| a class function interface with overladed things. The solution is to use
| function pointers. 

Or 'factories' with a base class derived classes, and and and. I think there
are many ways.

| Now, what comes to the rescue in the case of overladed constructors? Any suggestion?

What exactly do you want?

I think the basic word is that at a basic level we just can't.  The R API is
after C-based and we have to play some tricks about generated names for
functions etc.  Romain put some tricks into Rcpp modules to allow something
close to multiple constructors for a Modules object but we can't give you
each and every feature of C++ in Rcpp as there are some restrictions imposed
by being in between R and C++ --- which is the space we chose to be in.

Cheers, Dirk

-- 
Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com