Expand description
R6 class wrapper generator (R6Class with $new(), active bindings, private methods).
R6-class R wrapper generator.
Generates an R6::R6Class(...) definition with mutable, reference
semantics: obj$method() dispatches via R6, and &mut self methods
modify state in place without re-binding obj. Supports private methods,
active bindings (computed/settable properties), lifecycle hooks
(finalize, deep_clone), and inheritance via r6(inherit = ...).
Slower than env (R6 dispatch chain) and requires the R6 package; no value
semantics โ for value-semantics formal OOP, use S7.
Constantsยง
- MX_
INHERITED_ ๐PARAM_ PREFIX - Marker prefix emitted by the proc-macro when a subclass method param might be
inherited from a parent class documented in-package. Resolved at write-time in
registry.rsto either nothing (parent is documented โ roxygen2 inherits) or(no documentation available)(parent not found or not in-package).
Functionsยง
- active_
setter_ ๐precondition_ checks - Build the
stopifnot()precondition lines for the setter branch of a combined getter/setter active binding. - generate_
r6_ r_ wrapper - Generates the complete R wrapper string for an R6-style class.