C++ classes to embed R in C++ applications