R/time_entry.R

Defines functions checkTimeEntry

#_______________________________________________________________________________
#----                       time_entry class                                ----
#_______________________________________________________________________________

checkTimeEntry <- function(object) {
  check1 <- expectOne(object, "time")
  check2 <- expectPositiveValues(object, "time")
  return(c(check1, check2))
}

setClass(
  "time_entry",
  representation(
    time = "numeric"
  ),
  contains="pmx_element",
  validity=checkTimeEntry
)
Calvagone/campsis documentation built on Feb. 25, 2024, 8:35 p.m.