PrevUpHomeNext

Concept Converter

Converter

Description

A Converter is a type grouping two functions that read a certain number of elements off a range and write another number of elements on another one, hence making it a many-to-many conversion facility.

Associated types

  • input_type

    Converter::input_type

    The type of elements the converter converts from.

  • output_type

    Converter::output_type

    The type of elements the converter converts into.

  • max_output

    Converter::max_output

    Optional MPL integral constant that states how many elements may be added to out at maximum in an ltr or rtl call.

Notation

Converter
A type playing the role of model of Converter in the Converter concept.
In
A type playing the role of model of Bidirectional Iterator with elements convertible to input_type in the Converter concept.
Out
A type playing the role of model of OutputIterator<output_type> in the Converter concept.
p
Object of type Converter
pos
Object of type In
next
Object of type In&
out
Object of type Out

Valid expressions

Name Expression Type Precondition Semantics

Construction

Converter()

Converter

 

Construct an instance of the type with default parameters.

Left to right

p.ltr(next, pos, out)

Out

next != pos

Reads part of the [next, pos[ range left to right, modifying next as it advances, writes some elements of type output_type to out, and returns the past-the-end output iterator.

Right to left

p.rtl(pos, next, out)

Out

pos != next

Reads part of the [pos, next[ range right to left, modifying next as it advances, writes some elements of type output_type to out, and returns the past-the-end output iterator.

Models

  • boost::unicode::u8_decoder, boost::unicode::u16_decoder, boost::unicode::hangul_composer

PrevUpHomeNext