| 1 |
|
| 2 |
#' @export |
| 3 |
an_s7_class <- S7::new_class("an_s7_class") |
| 4 |
|
| 5 |
#' @importFrom t0 an_s7_generic |
| 6 |
S7::method(an_s7_generic, S7::class_character) <- function(x) "foo" |
| 7 |
S7::method(an_s7_generic, an_s7_class) <- function(x) "foo" |
| 8 |
|
| 9 |
#' @importFrom t0 an_s3_generic |
| 10 |
S7::method(an_s3_generic, an_s7_class) <- function(x) "foo" |
| 11 |
|
| 12 |
|
| 13 |
#' @rawNamespace importFrom(t0, `An S7 Class`) |
| 14 |
#' @export |
| 15 |
`An S7 Class 2` <- S7::new_class("An S7 Class 2", properties = list(bar = `An S7 Class`)) |
| 16 |
NULL |
| 17 |
|
| 18 |
`An Internal Class` <- S7::new_class("An Internal Class", properties = list( |
| 19 |
foo = `An S7 Class`, |
| 20 |
bar = `An S7 Class 2` |
| 21 |
)) |
| 22 |
|
| 23 |
|
| 24 |
another_s7_generic <- S7::new_external_generic("t1", "another_s7_generic", "x") |
| 25 |
S7::method(another_s7_generic, S7::class_character) <- function(x) "foo" |
| 26 |
S7::method(another_s7_generic, an_s7_class) <- function(x) "foo" |
| 27 |
|
| 28 |
another_s3_generic <- S7::new_external_generic("t1", "another_s3_generic", "x") |
| 29 |
S7::method(another_s3_generic, an_s7_class) <- function(x) "foo" |
| 30 |
|
| 31 |
|
| 32 |
.onLoad <- function(libname, pkgname) { |
| 33 |
S7::methods_register() |
| 34 |
} |