Le 27/04/2020 à 18:55, Toby Hocking a écrit :
Hi Dirk and Sokol, thanks for the responses.
Dirk I was aware that the C/C++ output type of wrap is always SEXP,
but I my question was about the R type/class.
Also thanks for the ref of the discussion in Sec 3.1 of the JSS 2011
article, which is pre
Hi Dirk and Sokol, thanks for the responses.
Dirk I was aware that the C/C++ output type of wrap is always SEXP, but I
my question was about the R type/class.
Also thanks for the ref of the discussion in Sec 3.1 of the JSS 2011
article, which is pretty much what I was looking for, but it seems to b
On 25 April 2020 at 16:04, Toby Hocking wrote:
| Hi, can someone please tell me where the return types of wrap are
| documented?
The _return_ value of a wrap() call is by definition always SEXP.
Just how the _input_ for as<>() converters is always a SEXP.
For wrap(), see e.g. Section 3.1 of the
Hi, can someone please tell me where the return types of wrap are
documented?
For context, I was looking at the Advanced R chapter on Rcpp
http://adv-r.had.co.nz/Rcpp.html which shows an example of a C++ function
with the Rcpp::exports attribute, that returns a std::map, and I was
wondering how th
Hi!
I just figured a way to deal with pointers to objects in memory which I receive
by calling whatever function of a third-party library. The problem is warp it
into a suitable object. My approach which does a nice job is:
template <>
SEXP wrap( B* const& mb ) {
typedef result ptr_wrap
Ah,
I need to think about this. Will give you an update if i manage to deal with it.
Romain
Le 2 août 2011 à 11:24, Sebastian Weber
a écrit :
> Hi!
>
> The solution you point out there is exactly what I need - but without class
> intrusion. The class I am wrapping is not under my control
Hi!
The solution you point out there is exactly what I need - but without class
intrusion. The class I am wrapping is not under my control, but belongs to a
third party. Or does your solution apply also in a non-intrusive case which I
overlooked?
Cheers,
Sebastian
Am 02.08.2011 um 11:10 schr
Hello sebastian,
I think what you are looking for is covered by some enhancements i added
recently and described in this thread:
http://thread.gmane.org/gmane.comp.lang.r.rcpp/2092
Romain
Le 1 août 2011 à 18:07, Sebastian Weber
a écrit :
> Hi,
>
> first of all thank you, Dirk and Romain
Hi!
To answer my question: The issue was with constness of the pointer (there are a
lot of variations of const pointers, saying wif the address or the object is
const, but never got right behind that declaration mess...). So what did it in
the end was to declare a wrap function which wraps the
Sebastuan,
On 1 August 2011 at 18:07, Sebastian Weber wrote:
| first of all thank you, Dirk and Romain, so much for this great library! I
was stunned when I saw the examples.
|
| Hence, I started immediately a quite involved project which interfaces
another library to R via C++.
That should
Hi,
first of all thank you, Dirk and Romain, so much for this great library! I was
stunned when I saw the examples.
Hence, I started immediately a quite involved project which interfaces another
library to R via C++. Currently I have the problem that I want to expose a
function from a class wh
Hi,
I've finally discovered the is_convertible type trait (from tr1 or
C++0x) which helps closing the implementation of wrap.
Here are the types that can currently be wrapped
int
size_t
double
bool
std::string
const char* const
Rbyte
Rcomplex
Additionally, if the type T can be wrapped, then t
12 matches
Mail list logo