Skip to content

Commit

Permalink
extracted class unions
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Aug 3, 2016
1 parent f0d3c26 commit 674bc1a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Imports:
digest
Remotes: IRKernel/IRdisplay,
Collate:
'class_unions.r'
'logging.r'
'comm_manager.r'
'environment.r'
Expand Down
1 change: 0 additions & 1 deletion IRkernel.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ AutoAppendNewline: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace
3 changes: 3 additions & 0 deletions R/class_unions.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
setClassUnion('functionOrNULL', members = c('function', 'NULL'))
setClassUnion('recordedplotOrNULL', members = c('recordedplot', 'NULL'))
setClassUnion('listOrNULL', members = c('list', 'NULL'))
6 changes: 2 additions & 4 deletions R/comm_manager.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#' @include logging.r
#' @include logging.r class_unions.r
NULL

setClassUnion('functionOrNULL', members = c('function', 'NULL'))

#' The Comm_Manager
#'
#' Has methods able to register comms/targets and process comm messages
Expand Down Expand Up @@ -228,4 +226,4 @@ Comm <- setRefClass(
}
}
)
)
)
6 changes: 1 addition & 5 deletions R/execution.r
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#' @include options.r
#' @include options.r class_unions.r
NULL

setClassUnion('recordedplotOrNULL', members = c('recordedplot', 'NULL'))

setClassUnion('listOrNULL', members = c('list', 'NULL'))

# Create an empty named list
#' @importFrom stats setNames
namedlist <- function() setNames(list(), character(0))
Expand Down

0 comments on commit 674bc1a

Please sign in to comment.