Skip to content
Snippets Groups Projects
Commit d2653ec0 authored by Ruben Heinrich's avatar Ruben Heinrich
Browse files

[base] cleaned up utils

parent 84ebfe11
No related branches found
No related tags found
1 merge request!6Merge branch 7 fixed functionality into master
...@@ -206,10 +206,12 @@ get_nonstandard_tag_names <- function(){ ...@@ -206,10 +206,12 @@ get_nonstandard_tag_names <- function(){
#'get_implemented_classes #'get_implemented_classes
#'@description Utility function, returns the names of all classes implemented #'@description Returns class names (and variable names) of `OGS6` variables.
#' so far. Change this if you implement new classes or delete old ones! #' Change this if you implement new `OGS6` variables or delete old ones!
#' If you implement a new class, you add the following to the character vector: #' If you implement a new variable, you add the following the `class_names`
#' <name_of_corresponding_OGS6_parameter> = <name_of_your_class> #' vector: `name_of_OGS6_variable = "name_of_your_class"`
#'@return character: Named vector containing class names of `OGS6` variables
#' and their corresponding variable name
get_implemented_classes <- function(){ get_implemented_classes <- function(){
class_names <- c(vtus = "OGS6_vtu", class_names <- c(vtus = "OGS6_vtu",
...@@ -246,23 +248,6 @@ is_wrapper <- function(ogs6_param_name){ ...@@ -246,23 +248,6 @@ is_wrapper <- function(ogs6_param_name){
} }
#===== R6 UTILITY =====
add_wrapper <- function(x, to_obj){
assertthat::assert_that(is.list(x))
assertthat::assert_that(any(grepl("OGS6_", class(to_obj), fixed = TRUE)))
for(i in seq_len(length(x))){
to_obj$add_component(x)
}
}
#===== INFO UTILITY ===== #===== INFO UTILITY =====
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment