<div dir="ltr"><div>Something like:</div><div><br></div><a href="https://wiki.python.org/moin/boost.python/WrappingEnums">https://wiki.python.org/moin/boost.python/WrappingEnums</a><br><div><br></div><div>??</div><div><br>

</div><div>I might poke around and see how hard that would be to implement.</div><div><br></div><div>THK</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 12:09 PM, 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>not really.  the std::is_enum trait in C++11 is going to help, but not that much. </div>

<div><br></div><div>Romain</div><div><br></div><div><div>Le 9 janv. 2014 à 19:02, Tim Keitt <<a href="mailto:tkeitt@utexas.edu" target="_blank">tkeitt@utexas.edu</a>> a écrit :</div><br><blockquote type="cite"><div dir="ltr">

<div>Thanks. Got it working. Looks very promising.</div><div><br></div>Any progress/work-arounds for enums? I have a ton to deal with.<div><br></div><div>THK</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">



On Thu, Jan 9, 2014 at 11:31 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>Hi, </div><div><br></div><div>The module docs is probably the one in the worst shape. I think the current recommendation is to have this in one of your .R files: </div><div><br></div>



<div>loadModule( "yourmodule", TRUE )</div><div><br></div><div>which triggers a load action for when the package is loaded. </div><div><br></div><div>Romain</div><div><br></div><div><div>Le 9 janv. 2014 à 17:45, Tim Keitt <<a href="mailto:tkeitt@utexas.edu" target="_blank">tkeitt@utexas.edu</a>> a écrit :</div>



<div><div><br><blockquote type="cite"><div dir="ltr">OK. Not quite as automatic as I thought.<div><br></div><div>Its now loading the class using 'loadRcppModules' in '.onLoad'.</div><div><br></div>

<div>Still a little lost. I'll have to re-read the modules docs. Not sure how to use the class. The factory did not get exposed. Do I have to expose it separately eg using attributes?</div>

<div><br></div><div>THK</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 10:20 AM, Tim Keitt <span dir="ltr"><<a href="mailto:tkeitt@utexas.edu" target="_blank">tkeitt@utexas.edu</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><div><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 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>
_______________________________________________<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></div><span><font color="#888888">-- <br><div dir="ltr"><a href="http://www.keittlab.org/" target="_blank">http://www.keittlab.org/</a></div>


</font></span></div>
</blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div dir="ltr"><a href="http://www.keittlab.org/" target="_blank">http://www.keittlab.org/</a></div>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><br>_______________________________________________<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><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><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>
</font></span></div>
</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>