# Generic IO Types

The C++ API makes use of generic types for input and output. For example, the signature of the filter method is:

    template <typename Input_Type, typename Output_Type>
    void filter(Input_Type& input, Output_Type& output);

Some input and output types are defined in `Keyview_IO.hpp`. These are InputFile, OutputFile, and InMemoryFile. You can create your own input and output types if required.

The requirements of an `InputType` are that it provides read, seek, and tell methods that conform to the example signatures of the `keyview::InputFile`. The requirement of an `OutputType` is that it provides a write method that conforms to the example signature of the `keyview::OutputFile`. A class can be valid as both an `InputType` and `OutputType`.

_FT_HTML5_bannerTitle.htm