ExtCpp {biodb} | R Documentation

## Extension C++ code class

### Description

A class for generating C++ example files (code & test).

### Details

This class generates examples of an R function written in C++ using Rcpp, of a pure C++ function used to speed up computing, and of C++ code for testing the pure C++ function. As for the R function written with Rcpp, it is tested inside standard testthat R code.

### Super class

`biodb::ExtGenerator` -> `ExtCpp`

### Methods

#### Public methods

- `ExtCpp$new()`

- `ExtCpp$clone()`

Inherited methods

- `biodb::ExtGenerator$generate()`

- `biodb::ExtGenerator$upgrade()`

#### Method `new()`

Constructor

##### Usage

    ExtCpp$new(...)

##### Arguments

`...`

  See the constructor of ExtGenerator for the parameters.

##### Returns

A new instance.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    ExtCpp$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

### Examples

    # Generate C++ files
    pkgFolder <- file.path(tempfile(), 'biodbFoo')
    dir.create(pkgFolder, recursive=TRUE)
    biodb::ExtCpp$new(path=pkgFolder)$generate()

[Package biodb version 1.0.4 Index]