Skip to content
Prev 5481 / 10988 Next

[Rcpp-devel] Invoking class methods via XPtr<> objects in R

All I want to do is obtain a shared-pointer equivalent in R to a C++ object and be able to do two things with it - 1. Invoke methods of the object via the shared-pointer and 2. pass the shared-pointer to the methods of other C++ class objects.

In Python, I am able to do this like so (Boost shared-ptrs are easily passed back and forth across the Python-C++ boundary using Boost-Python):
I am looking for the equivalent in R (or at least a close enough idiom).

Thanks
suresh