Previous: , Up: The output stream hierarchy   [Contents][Index]


3.5.5 Accessor functions

The various concrete stream classes have methods that allow you to retrieve the arguments passed to the respective constructor function.

Note: While these methods allow you to retrieve the underlying destination stream of various kinds of stream, it is not recommended to operate on both the stream and its underlying destination stream at the same time. Doing so can lead to undesired interactions between the two streams.

The file_ostream class has this accessor method:

Function: FILE * file_ostream_get_stdio_stream (file_ostream_t stream)

The fd_ostream class has these accessor methods:

Function: int fd_ostream_get_descriptor (fd_ostream_t stream)
Function: const char * fd_ostream_get_filename (fd_ostream_t stream)
Function: bool fd_ostream_is_buffered (fd_ostream_t stream)

The term_ostream class has these accessor methods:

Function: int term_ostream_get_descriptor (term_ostream_t stream)
Function: const char * term_ostream_get_filename (term_ostream_t stream)
Function: ttyctl_t term_ostream_get_tty_control (term_ostream_t stream)
Function: ttyctl_t term_ostream_get_effective_tty_control (term_ostream_t stream)

Returns the effective tty control of the stream (not TTYCTL_AUTO).

The iconv_ostream class has these accessor methods:

Function: const char * iconv_ostream_get_from_encoding (iconv_ostream_t stream)
Function: const char * iconv_ostream_get_to_encoding (iconv_ostream_t stream)
Function: ostream_t iconv_ostream_get_destination (iconv_ostream_t stream)

The html_ostream class has this accessor method:

Function: ostream_t html_ostream_get_destination (html_ostream_t stream)

The term_styled_ostream class has these accessor methods:

Function: term_ostream_t term_styled_ostream_get_destination (term_styled_ostream_t stream)
Function: const char * term_styled_ostream_get_css_filename (term_styled_ostream_t stream)

The html_styled_ostream class has these accessor methods:

Function: ostream_t html_styled_ostream_get_destination (html_styled_ostream_t stream)
Function: html_ostream_t html_styled_ostream_get_html_destination (html_styled_ostream_t stream)
Function: const char * html_styled_ostream_get_css_filename (html_styled_ostream_t stream)

The noop_styled_ostream class has these accessor methods:

Function: ostream_t noop_styled_ostream_get_destination (noop_styled_ostream_t stream)
Function: bool noop_styled_ostream_is_owning_destination (noop_styled_ostream_t stream)

Previous: Concrete styled_ostream subclasses, Up: The output stream hierarchy   [Contents][Index]