18 #ifndef Rcpp_api_meat_S4_h
19 #define Rcpp_api_meat_S4_h
23 template <
template <
class>
class StoragePolicy>
28 if( ! clazz.compare( cl[0] ) )
return true ;
31 SEXP containsSym = Rf_install(
"contains");
32 Shield<SEXP> classDef( R_getClassDef(CHAR(Rf_asChar(cl))) ) ;
33 CharacterVector res( Rf_getAttrib( R_do_slot( classDef, containsSym), R_NamesSymbol));
35 return any( res.begin(), res.end(), clazz.c_str() ) ;
AttributeProxy attr(const std::string &name)
Vector< STRSXP > CharacterVector
bool any(InputIterator first, InputIterator last, const T &value)