Skip to main content

Module s7_class

Module s7_class 

Source
Expand description

S7 class wrapper generator (new_class / new_generic modern R OOP). S7-class R wrapper generator.

Generates S7::new_class(...) with value semantics, formal property validation, and parent-based inheritance. Property attributes (s7(getter) / s7(setter, prop = "...")) compile to S7::new_property with @-access semantics, including read-only computed properties and read-write dynamic ones. Similar formal power to S4 with cleaner syntax, but the S7 ecosystem is younger and the R-package dependency surface is evolving. Pick S7 for new packages wanting modern formal OOP; use S4 when you need Bioconductor compatibility or multi-dispatch.

FunctionsΒ§

class_ref_or_any_or_verbatim πŸ”’
S7-property variant of class_ref_or_verbatim that asks the resolver to fall back silently to S7::class_any on miss (unregistered type, or a registered-but-non-S7 class). Prevents the load-time object not found noise called out in #203.
extract_prop_doc_from_tags πŸ”’
Extract the full property documentation from a getter’s doc_tags for use in @prop <name> <doc> emission.
generate_s7_r_wrapper
Generates the complete R wrapper string for an S7-style class.
rust_type_to_s7_class πŸ”’
Map a Rust return type to an S7 class name.
shortcut_advisory_lines πŸ”’
Roxygen prose for the fast-path dispatch shortcut advisory block.