# DualUseFilter

## Description

A DualUseFilter is a Filter which can act as an InputFilter or as an OutputFilter, but not as both simultaneously.

DualUseFilters help reduce the number of different Filter types required to implement a particlar filtering algorithm. For example, by implementing `basic_regex_filter` as a DualUseFilter, the Iostreams library avoids having to define separate templates `basic_regex_input_filter` and `basic_regex_output_filter`.

## Refinement of

InputFilter, OutputFilter.

## Associated Types

Character type | The type of the characters in the filtered sequences
Category | A type convertible to `filter_tag` and to `dual_use`
Mode | The unique most-derived mode tag to which Category is convertible

## Valid Expressions / Semantics

Same as BidirectionalFilter.

## Exceptions

Same as BidirectionalFilter.

## Models

- The Text Processing Filters.
- The compression and decompression filters, except for `basic_gzip_decompressor`.

© Copyright 2008 CodeRage, LLC
© Copyright 2004-2007 Jonathan Turkanis

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)