81 std::vector<std::string> v;
82#if R_VERSION >= R_Version(4, 6, 0)
83 SEXP attrs = R_getAttribNames(
static_cast<const CLASS&
>(*
this));
84 R_xlen_t n = XLENGTH(attrs);
85 for (R_xlen_t i = 0; i < n; i++) {
86 v.push_back(std::string(CHAR(STRING_ELT(attrs, i))));
89 SEXP attrs = ATTRIB(
static_cast<const CLASS&
>(*
this) );
90 while( attrs != R_NilValue ){
91 v.push_back( std::string(CHAR(PRINTNAME(TAG(attrs)))) ) ;
92 attrs = CDR( attrs ) ;