RC++Reference-class: General classes for a reference to a C++ object

RC++Reference-classR Documentation

General classes for a reference to a C++ object

Description

The class RC++Reference is the class that holds the address of a C++ object. With the programmatically constructed code (or manually) we can then invoke its C++ methods and access its public fields from within R and generally manipulate the C++ object.

The class RC++ReferenceUseName class is a simple extension of RC++Reference which exploits the fact that the R functions corresponding to the C++ methods for an instance are of the form class_<method name>, e.g. MyClass_plot for a reference class named MyClassPtr.

Objects from the Class

Objects can be created by calls of the form new("RC++Reference", ...). They are usuall returned from calls to R functions that call C++ code to create the object.

Slots

ref:

Object of class "externalptr" this is the R object that holds the address of the C++ object.

classes:

Object of class "character" the name of R classes that correspond to the C++ class hierarchy.

Methods

addFinalizer

signature(obj = "RC++Reference", finalizer = "logical"):

addFinalizer

signature(obj = "RC++Reference", finalizer = "NativeSymbolInfo"):

addFinalizer

signature(obj = "RC++Reference", finalizer = "NativeSymbol"):

addFinalizer

signature(obj = "RC++Reference", finalizer = "function"):

$

signature(x = "RC++Reference"): ...

Free

signature(obj = "RC++Reference"): ...

Author(s)

Duncan Temple Lang

References

“Writing R Extensions Manual”, R Development Core Team

The RAutoGenRunTime package for programmatically reading C/C++ code and generating bindings for the data structures, methods and routines.

Examples

showClass("RC++Reference")

omegahat/RAutoGenRunTime documentation built on Jan. 12, 2023, 9:19 p.m.