diff options
author | Bruno Haible <bruno@clisp.org> | 2019-04-02 17:52:29 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-04-02 17:52:29 +0200 |
commit | 7200ac4191bd1fed0e5b9230d354fb17716b5559 (patch) | |
tree | ec26ee2e00e3d1df32fba6c665e89da3a410ef6c /libtextstyle/doc | |
parent | 283418cdf9425f5abc13e9097f1507e26f81d54e (diff) | |
download | gettext-7200ac4191bd1fed0e5b9230d354fb17716b5559.tar.gz |
libtextstyle: Generalize fd-styled-ostream to noop-styled-ostream.
* gnulib-local/lib/noop-styled-ostream.oo.h: New file, based on
gnulib-local/lib/fd-styled-ostream.oo.h.
* gnulib-local/lib/noop-styled-ostream.oo.c: New file, based on
gnulib-local/lib/fd-styled-ostream.oo.c.
* gnulib-local/modules/noop-styled-ostream: New file, based on
gnulib-local/modules/fd-styled-ostream.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove lib/fd-styled-ostream.oo.[hc]
and modules/fd-styled-ostream. Add lib/noop-styled-ostream.oo.[hc] and
modules/noop-styled-ostream.
* libtextstyle/woe32dll/c++noop-styled-ostream.cc: New file, based on
libtextstyle/woe32dll/c++fd-styled-ostream.cc.
* libtextstyle/gnulib-local/modules/noop-styled-ostream.diff: New file, based
on libtextstyle/gnulib-local/modules/fd-styled-ostream.diff.
* gnulib-local/lib/fd-styled-ostream.oo.h: Remove file.
* gnulib-local/lib/fd-styled-ostream.oo.c: Remove file.
* gnulib-local/modules/fd-styled-ostream: Remove file.
* libtextstyle/woe32dll/c++fd-styled-ostream.cc: Remove file.
* libtextstyle/gnulib-local/modules/fd-styled-ostream.diff: Remove file.
* libtextstyle/autogen.sh (GNULIB_MODULES): Add noop-styled-ostream. Remove
fd-styled-ostream.
* libtextstyle/lib/misc.c: Include noop-styled-ostream.h, fd-ostream.h.
(styled_ostream_create): Call fd_ostream_create and noop_styled_ostream_create
instead of fd_styled_ostream_create.
* libtextstyle/lib/textstyle.h (noop_styled_ostream_t): New type.
(noop_styled_ostream_*): New declarations.
* libtextstyle/doc/libtextstyle.texi (The noop_styled_ostream class): New
subsection.
Diffstat (limited to 'libtextstyle/doc')
-rw-r--r-- | libtextstyle/doc/libtextstyle.texi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libtextstyle/doc/libtextstyle.texi b/libtextstyle/doc/libtextstyle.texi index 174487c6f..a9ca095c7 100644 --- a/libtextstyle/doc/libtextstyle.texi +++ b/libtextstyle/doc/libtextstyle.texi @@ -990,6 +990,7 @@ can be closed. @menu * The term_styled_ostream class:: Styled output to a terminal. * The html_styled_ostream class:: Styled output to an HTML file. +* The noop_styled_ostream class:: No-op styling. @end menu @node The term_styled_ostream class @@ -1052,6 +1053,27 @@ Note: The resulting stream must be closed before @code{@var{destination}} can be closed. @end deftypefn +@node The noop_styled_ostream class +@subsubsection The @code{noop_styled_ostream} class + +The @code{noop_styled_ostream} class supports the styled output operations +to any destination. The text is output to the given destination; the +styling operations, however, do nothing. Its type is +@samp{noop_styled_ostream_t}. It is a subclass of @samp{styled_ostream_t}. + +It can be instantiated through this function: + +@deftypefn Function noop_styled_ostream_t noop_styled_ostream_create (ostream_t@tie{}@var{destination}, bool@tie{}@var{pass_ownership}) +Creates an output stream that delegates to @code{@var{destination}} and +that supports the styling operations as no-ops. + +If @code{@var{pass_ownership}} is @code{true}, closing the resulting +stream will automatically close the @code{@var{destination}}. + +Note: If @code{@var{pass_ownership}} is @code{false}, the resulting stream +must be closed before @code{@var{destination}} can be closed. +@end deftypefn + @node What to document @section Documenting the text styling support |