BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION > Class Template Reference

#include <bdlb_functionoutputiterator.h>

Public Types

typedef bsl::output_iterator_tag iterator_category
 
typedef void difference_type
 
typedef void value_type
 
typedef void reference
 
typedef void pointer
 Provide type aliases required by C++ standard iterator_traits.
 

Public Member Functions

 FunctionOutputIterator ()
 
 FunctionOutputIterator (const FUNCTION &function)
 
 FunctionOutputIterator (const FunctionOutputIterator &rhs)=default
 
 ~FunctionOutputIterator ()=default
 Destroy this object.
 
FunctionOutputIteratoroperator= (const FunctionOutputIterator &rhs)=default
 
AssignmentProxy operator* ()
 

Detailed Description

template<class FUNCTION>
class bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >

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 if a function pointer type, assigning to the dereferenced iterator will call the function supplied at construction with the assigned value as a parameter.

Member Typedef Documentation

◆ difference_type

template<class FUNCTION >
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::difference_type

◆ iterator_category

template<class FUNCTION >
typedef bsl::output_iterator_tag bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::iterator_category

◆ pointer

template<class FUNCTION >
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::pointer

◆ reference

template<class FUNCTION >
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::reference

◆ value_type

template<class FUNCTION >
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::value_type

Constructor & Destructor Documentation

◆ ~FunctionOutputIterator()

template<class FUNCTION >
bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::~FunctionOutputIterator ( )
default

Member Function Documentation

◆ FunctionOutputIterator() [1/3]

template<class FUNCTION >
bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::FunctionOutputIterator ( )

Create a FunctionOutputIterator object that, when an assignment is performed on the dereferenced object, will call a default constructed instance of the (template parameter) type FUNCTION passing the assigned value as the argument. Note that if FUNCTION is a function pointer type, then the default constructed FUNCTION will be 0, and the behavior when assigning to a dereferenced iterator will be undefined.

◆ FunctionOutputIterator() [2/3]

template<class FUNCTION >
bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::FunctionOutputIterator ( const FUNCTION &  function)
explicit

Create FunctionOutputIterator object that, when an assignment is performed on the dereferenced object, will call the specified function passing the assigned value as the argument.

◆ FunctionOutputIterator() [3/3]

template<class FUNCTION >
bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::FunctionOutputIterator ( const FunctionOutputIterator &  rhs)
default

Create a 'FunctionOutputIterator' object that, when an assignment is performed on the dereferenced object, will call the same function or functor used by the specified 'rhs' object.

◆ operator*()

template<class FUNCTION >
AssignmentProxy bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::operator* ( )

Return an object that can appear on the left-hand side of an assignment from TYPE. When a value is assigned to the returned value, invoke the functor or function indicated at construction supplying the assigned value as the parameter. This function is non-const in accordance with the input iterator requirements, even though *this is not modified. Note that if FUNCTION is a function pointer type and a valid function pointer was not supplied at construction, then the behavior when assigning to a dereferenced iterator will be undefined.

◆ operator=()

template<class FUNCTION >
FunctionOutputIterator & bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::operator= ( const FunctionOutputIterator rhs)
default

Assign to this object the value of the specified 'rhs' object, and return a reference providing modifiable access to this object.


The documentation for this class was generated from the following file: