R/Constraint.R

setClass("Constraint", representation(math = "expression", message = "character"), contains = "SBase")

setMethod("describe", "Constraint",
          function(object)
          paste(math(object), " (", msg(object), ")", sep = ""))

setMethod("math", "Constraint", function(object) object@math)

setGeneric("msg", function(object) standardGeneric("msg"))
setMethod("msg", "Constraint", function(object) object@message)

setReplaceMethod("math", "Constraint", function(object, value) {
  object@math <- value
  object
})

setGeneric("msg<-", function(object, value) standardGeneric("msg<-"))
setReplaceMethod("msg", "Constraint", function(object, value) {
  object@message <- value
  object
})

Try the rsbml package in your browser

Any scripts or data that you put into this service are public.

rsbml documentation built on Nov. 8, 2020, 8:09 p.m.