BloombergLP::bdlb::FunctionOutputIterator

Provide an output iterator that invokes a client-supplied functor.

Synopsis

Declared in <bdlb_functionoutputiterator.h>

template<class FUNCTION>
class FunctionOutputIterator;

Description

Provide an output iterator that calls an object of the (template parameter) type FUNCTION. If FUNCTION is a functor, de-referencing this iterator and assigning to the result (of dereferencing) will call the operator() of the functor with the assigned value as a parameter. Similarly, if FUNCTION is a function pointer type, assigning to the dereferenced iterator will call the function supplied at construction with the assigned value as a parameter.

Type Aliases

NameDescription
difference_type Unused difference type required by iterator_traits (always void).
iterator_category Tag identifying this type as an output iterator.
pointer Unused pointer type required by iterator_traits (always void).
reference Unused reference type required by iterator_traits (always void).
value_type Unused value type required by iterator_traits (always void).

Member Functions

NameDescription
FunctionOutputIterator [constructor]Constructors
operator* Return a proxy that invokes the held functor on assignment.

Non-Member Functions

NameDescription
operator++Do nothing and return a copy of the specified iterator.
operator++Do nothing and return the specified iterator.