| 664 | |
| 665 | template <typename T, typename elem_type> |
| 666 | inline SEXP wrap_dispatch_importer__impl__prim(const T& object, ::Rcpp::traits::false_type) { |
| 667 | int size = object.size(); |
| 668 | const int RTYPE = ::Rcpp::traits::r_sexptype_traits<elem_type>::rtype; |
| 669 | Shield<SEXP> x(Rf_allocVector(RTYPE, size)); |
| 670 | typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE; |
| 671 | CTYPE* start = r_vector_start<RTYPE>(x); |
| 672 | for (int i=0; i<size; i++) { |
| 673 | start[i] = object.get(i); |
| 674 | } |
| 675 | return x; |
| 676 | |
| 677 | } |
| 678 | |
| 679 | template <typename T, typename elem_type> |
| 680 | inline SEXP wrap_dispatch_importer__impl__prim(const T& object, ::Rcpp::traits::true_type) { |