<div dir="ltr">Thanks. That at least compiles. (If anyone is curious, through trial-and-error it appears .factory is not a template and takes a single argument, the factory function pointer.)<div><br></div><div>However I am not seeing any of my functions exported to the package. How would the factory be called from R? I sort of understood that exporting in packages was automatic. Do I have to manually create the module in R?<div>
<br></div><div>THK</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 4:40 AM, Romain Francois <span dir="ltr"><<a href="mailto:romain@r-enthusiasts.com" target="_blank">romain@r-enthusiasts.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hello, </div><div><br></div><div>You can use .factory instead of .constructor in that case. </div>
<div><br></div><div>Romain</div><br><div><div>Le 9 janv. 2014 à 03:16, Tim Keitt <<a href="mailto:tkeitt@utexas.edu" target="_blank">tkeitt@utexas.edu</a>> a écrit :</div><br><blockquote type="cite"><div><div class="h5">
<div dir="ltr">I did a little experiment with RCPP_MODULE trying to wrap a class from another library. The class in question has a protected default constructor and uses a non-member factory function for instantiation.<div>
<br></div><div>In short I did not get it to work. I am assuming that if you do not include a .constuctor statement, then the class does not get wrapped in the module. Is that correct?<div><br></div><div>THK<br clear="all">
<div><br></div>-- <br><div dir="ltr"><a href="http://www.keittlab.org/" target="_blank">http://www.keittlab.org/</a></div>
</div></div></div></div></div>
_______________________________________________<br>Rcpp-devel mailing list<br><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote>
</div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><a href="http://www.keittlab.org/" target="_blank">http://www.keittlab.org/</a></div>
</div>