This is not supported currently. It might be in the future when someone finds
time or funding.
One thing that could be done is to create a simple wrapper function around it
and expose this with the module. You wont get the associarion with the class
though.
double wrapper_myFunction(){
return Foo::myFunction() ;
}
We might support direct syntactic sugar for exposing static functions later,
but i'm not sure the concept of staric functions is supported by reference
classes which is the texhnology we use to expose module classes.
Romain
Le 9 mai 2013 à 16:47, Julien Duvanel <[email protected]> a écrit :
> Hello,
>
> First of all, thanks for all the Rcpp*. It's very helpful.
>
> I have a small question, and I can't (unfortunately) find the answer over the
> internet. I'm trying to do this :
>
> class Foo {
> public:
> double static myFunction();
> };
>
> And then, use the RCPP_MODULE :
>
> RCPP_MODULE(mod_Foo) {
> class_<Foo>("Foo")
>
> .method("myFunction", &Foo::MyFunction", "bla bla bla")
> }
>
> Unfortunately, it doesn't compile and gives me the following error :
>
> integration.h:82: error: no matching function for call to
> ‘Rcpp::class_<NewModel>::method(const char [12], Rcpp::NumericVector
> (*)(Rcpp::NumericVector, Rcpp::NumericVector, double, double, double, double,
> int), const char [37])’
>
> Maybe it just works as intended, but I haven't found anything inside the
> documentation. (It works when I remove the static). Has anybody an idea ?
>
> Thank you very much and have a nice day,
>
> Julien
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel