c_str_ptr_extract_iterator Struct Template Reference
[Iterators Library]

#include <stlsoft/iterators/c_str_inserter.hpp>

Inheritance diagram for c_str_ptr_extract_iterator:

iterator_base< std::output_iterator_tag, void, void, void, void >

List of all members.


Detailed Description

template<typename F>
struct stlsoft::c_str_ptr_extract_iterator< F >

This iterator adaptor translates the values assigned to it via the c_str_ptr access shim, and passes the result to the function on which it's parameterised.

It would be used as shown in the following example, which copies all files found in the local directory to the vector of strings:

  std::vector<std::string>  c1;
  unixstl::readdir_sequence files(".");

  std::copy(files.begin(), files.end(), c_str_inserter(std::back_inserter(c1)));

  std::cout << "Files:" << std::endl;
  std::copy(c1.begin(), c1.end(), stlsoft::ostream_iterator<std::string>(std::cout, "\t", "\n"));

Public Types

typedef F function_type
typedef
c_str_ptr_extract_iterator< F > 
class_type

Public Member Functions

 c_str_ptr_extract_iterator (F &f)
deref_proxy operator* ()
class_typeoperator++ ()
class_type operator++ (int)

Classes

class  deref_proxy

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

Generated on Thu Jun 10 08:58:47 2010 for STLSoft by  doxygen 1.5.6