Loading...
Searching...
No Matches
Go to the documentation of this file.
22#ifndef Rcpp__macros__traits_h
23#define Rcpp__macros__traits_h
25#define RCPP_TRAITS(__CLASS__,__SEXPTYPE__) \
26namespace Rcpp{ namespace traits { \
27template<> struct r_type_traits< __CLASS__ >{ \
28 typedef r_type_primitive_tag r_category ; \
30template<> struct r_type_traits< std::pair< std::string , __CLASS__ > >{ \
31 typedef r_type_pairstring_primitive_tag r_category ; \
33template<> struct wrap_type_traits< __CLASS__ >{ \
34 typedef wrap_type_primitive_tag wrap_category ; \
36template<> struct r_sexptype_traits< __CLASS__ >{ \
37 enum{ rtype = __SEXPTYPE__ } ; \
40#define RCPP_ENUM_TRAITS(__ENUM__) RCPP_TRAITS(__ENUM__,INTSXP)