BDE 4.14.0 Production release
|
#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. | |
FunctionOutputIterator & | operator= (const FunctionOutputIterator &rhs)=default |
AssignmentProxy | operator* () |
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.
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::difference_type |
typedef bsl::output_iterator_tag bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::iterator_category |
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::pointer |
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::reference |
typedef void bdlb::BDLB_SUNITERATORWORKAROUND< FUNCTION >::value_type |
|
default |
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.
|
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.
|
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.
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.
|
default |
Assign to this object the value of the specified 'rhs' object, and return a reference providing modifiable access to this object.