From 22fad86621d13c965700c09c221afd73c6a30517 Mon Sep 17 00:00:00 2001
From: "arsenij.ustjanzew" <arsenij.ustjanzew@mpi-bn.mpg.de>
Date: Tue, 18 Feb 2020 11:01:52 +0100
Subject: [PATCH] changed naming of getter and setter methods

---
 NAMESPACE                | 16 ++++++++--------
 R/AllGenerics.R          | 16 ++++++++--------
 R/get_set.R              | 16 ++++++++--------
 man/i2dashboard-class.Rd | 16 ++++++++--------
 4 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/NAMESPACE b/NAMESPACE
index 4f3d95c..1f686df 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,24 +1,24 @@
 # Generated by roxygen2: do not edit by hand
 
 export("%>%")
+export("author<-")
+export("datadir<-")
 export("interactivity<-")
+export("theme<-")
+export("title<-")
 export(add_colormap)
 export(add_component)
 export(add_page)
 export(add_to_sidebar)
 export(assemble)
+export(author)
+export(datadir)
 export(embed_var)
-export(get_author)
-export(get_datadir)
-export(get_theme)
-export(get_title)
 export(i2dashboard)
 export(interactivity)
 export(remove_page)
-export(set_author)
-export(set_datadir)
-export(set_theme)
-export(set_title)
+export(theme)
+export(title)
 exportClasses(i2dashboard)
 exportMethods(add_colormap)
 exportMethods(add_component)
diff --git a/R/AllGenerics.R b/R/AllGenerics.R
index ddfd9e4..4888ef2 100644
--- a/R/AllGenerics.R
+++ b/R/AllGenerics.R
@@ -24,25 +24,25 @@ setGeneric("interactivity", function(dashboard) standardGeneric("interactivity")
 setGeneric("interactivity<-", function(dashboard, value) standardGeneric("interactivity<-"))
 
 #' @export
-setGeneric("get_title", function(dashboard) standardGeneric("get_title"))
+setGeneric("title", function(dashboard) standardGeneric("title"))
 
 #' @export
-setGeneric("set_title", function(dashboard, value) standardGeneric("set_title"))
+setGeneric("title<-", function(dashboard, value) standardGeneric("title<-"))
 
 #' @export
-setGeneric("get_author", function(dashboard) standardGeneric("get_author"))
+setGeneric("author", function(dashboard) standardGeneric("author"))
 
 #' @export
-setGeneric("set_author", function(dashboard, value) standardGeneric("set_author"))
+setGeneric("author<-", function(dashboard, value) standardGeneric("author<-"))
 
 #' @export
-setGeneric("get_theme", function(dashboard) standardGeneric("get_theme"))
+setGeneric("theme", function(dashboard) standardGeneric("theme"))
 
 #' @export
-setGeneric("set_theme", function(dashboard, value) standardGeneric("set_theme"))
+setGeneric("theme<-", function(dashboard, value) standardGeneric("theme<-"))
 
 #' @export
-setGeneric("get_datadir", function(dashboard) standardGeneric("get_datadir"))
+setGeneric("datadir", function(dashboard) standardGeneric("datadir"))
 
 #' @export
-setGeneric("set_datadir", function(dashboard, value) standardGeneric("set_datadir"))
\ No newline at end of file
+setGeneric("datadir<-", function(dashboard, value) standardGeneric("datadir<-"))
\ No newline at end of file
diff --git a/R/get_set.R b/R/get_set.R
index 18618e8..b51daf8 100644
--- a/R/get_set.R
+++ b/R/get_set.R
@@ -21,11 +21,11 @@ setMethod("interactivity<-", "i2dashboard", function(dashboard, value) {
 #'
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("get_title", "i2dashboard", function(dashboard) dashboard@title)
+setMethod("title", "i2dashboard", function(dashboard) dashboard@title)
 
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("set_title", "i2dashboard", function(dashboard, value) {
+setMethod("title<-", "i2dashboard", function(dashboard, value) {
   dashboard@title <- value
   dashboard
 })
@@ -37,11 +37,11 @@ setMethod("set_title", "i2dashboard", function(dashboard, value) {
 #'
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("get_author", "i2dashboard", function(dashboard) dashboard@author)
+setMethod("author", "i2dashboard", function(dashboard) dashboard@author)
 
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("set_author", "i2dashboard", function(dashboard, value) {
+setMethod("author<-", "i2dashboard", function(dashboard, value) {
   dashboard@author <- value
   dashboard
 })
@@ -53,11 +53,11 @@ setMethod("set_author", "i2dashboard", function(dashboard, value) {
 #'
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("get_theme", "i2dashboard", function(dashboard) dashboard@theme)
+setMethod("theme", "i2dashboard", function(dashboard) dashboard@theme)
 
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("set_theme", "i2dashboard", function(dashboard, value) {
+setMethod("theme<-", "i2dashboard", function(dashboard, value) {
   dashboard@theme <- value
   dashboard
 })
@@ -69,11 +69,11 @@ setMethod("set_theme", "i2dashboard", function(dashboard, value) {
 #'
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("get_datadir", "i2dashboard", function(dashboard) dashboard@datadir)
+setMethod("datadir", "i2dashboard", function(dashboard) dashboard@datadir)
 
 #' @name i2dashboard-class
 #' @rdname i2dashboard-class
-setMethod("set_datadir", "i2dashboard", function(dashboard, value) {
+setMethod("datadir<-", "i2dashboard", function(dashboard, value) {
   dashboard@datadir <- value
   dashboard
 })
diff --git a/man/i2dashboard-class.Rd b/man/i2dashboard-class.Rd
index 5b509bb..d5a103c 100644
--- a/man/i2dashboard-class.Rd
+++ b/man/i2dashboard-class.Rd
@@ -8,21 +8,21 @@
 
 \S4method{interactivity}{i2dashboard}(dashboard) <- value
 
-\S4method{get_title}{i2dashboard}(dashboard)
+\S4method{title}{i2dashboard}(dashboard)
 
-\S4method{set_title}{i2dashboard}(dashboard, value)
+\S4method{title}{i2dashboard}(dashboard) <- value
 
-\S4method{get_author}{i2dashboard}(dashboard)
+\S4method{author}{i2dashboard}(dashboard)
 
-\S4method{set_author}{i2dashboard}(dashboard, value)
+\S4method{author}{i2dashboard}(dashboard) <- value
 
-\S4method{get_theme}{i2dashboard}(dashboard)
+\S4method{theme}{i2dashboard}(dashboard)
 
-\S4method{set_theme}{i2dashboard}(dashboard, value)
+\S4method{theme}{i2dashboard}(dashboard) <- value
 
-\S4method{get_datadir}{i2dashboard}(dashboard)
+\S4method{datadir}{i2dashboard}(dashboard)
 
-\S4method{set_datadir}{i2dashboard}(dashboard, value)
+\S4method{datadir}{i2dashboard}(dashboard) <- value
 }
 \arguments{
 \item{dashboard}{A \linkS4class{i2dash::i2dashboard}.}
-- 
GitLab