From 980cebe39efb573f4863ead37fe6aa47cb4a90cf Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Tue, 17 Dec 2019 20:35:58 -0500 Subject: [PATCH] Minor documentation changes --- doc/ios_state.adoc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/ios_state.adoc b/doc/ios_state.adoc index 1cff15a..c3f64d7 100644 --- a/doc/ios_state.adoc +++ b/doc/ios_state.adoc @@ -109,13 +109,14 @@ The basic saver classes have this format: [subs=+quotes] ``` -class saver_class { +class saver { +public: typedef std::ios_base state_type; typedef `implementation_defined` aspect_type; - explicit saver_class(state_type& s); - saver_class(state_type& s, const aspect_type& new_value); - ~saver_class(); + explicit saver(state_type& s); + saver(state_type& s, const aspect_type& new_value); + ~saver(); void restore(); }; @@ -159,13 +160,14 @@ The saver class templates have this format: [subs=+quotes] ``` template -class saver_class { +class saver { +public: typedef std::basic_ios state_type; typedef `implementation-defined` aspect_type; - explicit saver_class(state_type& s); - saver_class(state_type& s, const aspect_type& new_value); - ~saver_class(); + explicit saver(state_type& s); + saver(state_type& s, const aspect_type& new_value); + ~saver(); void restore(); }; @@ -259,7 +261,7 @@ The code used in the rationale can be improved at two places. The printing function could use a saver around the code that changes the formatting state. Or the calling function can surround the call with a saver. Or both can be done, especially if the user does not know if the printing function uses a -state saver. If the user wants a series of changes back & forth, without +state saver. If the user wants a series of changes back and forth, without surrounding each change within a separate block, the restore member function can be called between each trial.