R/AbstractClass.R

#' Reference Class representing a non instantiable class
#' @description An abstract base class with some utility methods
#' @export
AbstractClass <- setRefClass(
  Class = "AbstractClass",
  methods = list (
      initialize = function() {         
         stop("AbstractClass is an abstract class that can't be initialized.")
      },
      preventInstatiation = function(self) {
        stop(paste(class(self), "is an abstract class that can't be initialized."))
      }
   )
)

Try the xmlr package in your browser

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

xmlr documentation built on July 2, 2020, 2:42 a.m.