196: Highlights
Reader and writer member functions provide an indirect route to member variable reference and assignment.
You can define reader and writer member functions for imaginary member variables.
If
you want to refer to a member-variable value using a reader,
then
instantiate the following pattern:
class object
.
reader function
( )
If
you want to assign a member-variable value using a writer,
then
instantiate the following pattern:
class object
.
writer function
(
expression
)