To automatatically generate getters and setters, just use the accessors
method:
pathRoot$accessors(c("W", "Y", "H"))
Example
p = pathRoot$new(W="A",Y="B",H="C")
R> p$getY()
[1] "B"
R> p$setW("Hi")
R> p$getW()
[1] "Hi"
You can also access the variables via the $
, e.g.
p$W