R/AGraphicalObject.R

setClass("GraphicalObject", representation(id = "character", boundingBox = "BoundingBox"), 
  contains = "SBase")

setMethod("describe", "GraphicalObject",
          function(object) {
            paste("in ", describe(boundingBox(object)), sep = "")
          })

setMethod("id", "GraphicalObject", function(object) object@id)

 setGeneric("boundingBox", function(object) standardGeneric("boundingBox"))
setMethod("boundingBox", "GraphicalObject", function(object) object@boundingBox)

 
setReplaceMethod("id", "GraphicalObject", function(object, value) {
  object@id <- value
  object
})

 setGeneric("boundingBox<-", function(object, value) standardGeneric("boundingBox<-"))
setReplaceMethod("boundingBox", "GraphicalObject", function(object, value) {
  object@boundingBox <- 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.