tests/testthat/nativeapi/R/api.R

.onUnload <- function(libpath) {
  library.dynam.unload("nativeapi", libpath)
}

get_class <- function(object, interface = c("c", "cpp", "registered")) {
  routine <- switch(
    match.arg(interface),
    c = native_class,
    cpp = cpp_class,
    registered = registered_class
  )
  .Call(routine, object)
}

get_prop <- function(object, name, interface = c("c", "cpp", "registered")) {
  routine <- switch(
    match.arg(interface),
    c = native_prop,
    cpp = cpp_prop,
    registered = registered_prop
  )
  .Call(routine, object, name)
}

Try the S7 package in your browser

Any scripts or data that you put into this service are public.

S7 documentation built on Nov. 19, 2026, 9:06 a.m.