MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / is_module_object_internal

Function is_module_object_internal

inst/include/Rcpp/api/meat/is.h:153–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151#ifndef RCPP_NO_MODULES
152
153 inline bool is_module_object_internal(SEXP obj, const char* clazz){
154 Environment env(obj);
155 SEXP sexp = env.get(".cppclass");
156 if (TYPEOF(sexp) != EXTPTRSXP) return false;
157 XPtr<class_Base> xp(sexp);
158 return xp->has_typeinfo_name(clazz);
159 }
160 template <typename T> bool is__module__object(SEXP x) {
161 if (!is__simple<S4>(x)) return false;
162 typedef typename Rcpp::traits::un_pointer<T>::type CLASS;

Callers 1

is__module__objectFunction · 0.85

Calls 2

has_typeinfo_nameMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected