R/cppsnippet.R

## a class to hold snippets of C code

setClass(
  "Cppsnippet",
  slots=c(
    text="character"
  ),
  prototype=prototype(
    text=character(0)
  )
)

Cppsnippet <- function (text) {
  new(
    "Cppsnippet",
    text=as.character(text)
  )
}

setAs(
  from="Cppsnippet",
  to="character",
  def = function (from) {
    from@text
  }
)
holaanna/contactsimulator documentation built on Dec. 2, 2019, 2:39 a.m.