-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathgeoflow_process.R
60 lines (55 loc) · 1.67 KB
/
geoflow_process.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#' geoflow_process
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#'
#' @name geoflow_process
#' @title Geoflow process class
#' @description This class models an process
#' @keywords process
#' @return Object of \code{\link{R6Class}} for modelling an process
#' @format \code{\link{R6Class}} object.
#'
#' @examples
#' \dontrun{
#' process <- geoflow_process$new()
#' process$setRationale("rationale")
#' process$setDescription("description")
#' processor <- geoflow_contact$new()
#' process$addProcessor(processor)
#' }
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
geoflow_process <- R6Class("geoflow_process",
list(
#'@field rationale process rationale
rationale = NULL,
#'@field description process description
description = NULL,
#'@field processors object of class \code{list}
processors = list(),
#'@description Initializes the \link{geoflow_process}
initialize = function(){
},
#'@description Set process rationale
#'@param rationale the process rationale
setRationale = function(rationale){
self$rationale <- rationale
},
#'@description Set process description
#'@param description Set the process description
setDescription = function(description){
self$description <- description
},
#'@description Adds processor
#'@param processor, object of class \link{geoflow_contact}
addProcessor = function(processor){
if(!is(processor, "geoflow_contact")){
stop("The processor should be an object of class 'geoflow_contact")
}
self$processors <- c(self$processors, processor)
}
)
)