Quick Links:

bal | bbl | bdl | bsl

Classes | Public Types | Public Member Functions

bdlb::FunctionOutputIterator< FUNCTION > Class Template Reference

#include <bdlb_functionoutputiterator.h>

List of all members.

Classes

class  AssignmentProxy

Public Types

typedef bsl::output_iterator_tag iterator_category
typedef void difference_type
typedef void value_type
typedef void reference
typedef void pointer

Public Member Functions

 FunctionOutputIterator ()
 FunctionOutputIterator (const FUNCTION &function)
 FunctionOutputIterator (const FunctionOutputIterator &rhs)
 ~FunctionOutputIterator ()

Detailed Description

template<class FUNCTION>
class bdlb::FunctionOutputIterator< 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.

See Component bdlb_functionoutputiterator


Member Typedef Documentation

template<class FUNCTION>
typedef bsl::output_iterator_tag bdlb::FunctionOutputIterator< FUNCTION >::iterator_category
template<class FUNCTION>
typedef void bdlb::FunctionOutputIterator< FUNCTION >::difference_type
template<class FUNCTION>
typedef void bdlb::FunctionOutputIterator< FUNCTION >::value_type
template<class FUNCTION>
typedef void bdlb::FunctionOutputIterator< FUNCTION >::reference
template<class FUNCTION>
typedef void bdlb::FunctionOutputIterator< FUNCTION >::pointer

Constructor & Destructor Documentation

template<class FUNCTION>
bdlb::FunctionOutputIterator< 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.

template<class FUNCTION>
bdlb::FunctionOutputIterator< 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.

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

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.

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

Destroy this object.


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