Espaces de noms
Variantes
Affichages
Actions

std::ostreambuf_iterator

De cppreference.com
< cpp‎ | iterator

 
 
Bibliothèque Iterator
Primitives Iterator
Original:
Iterator primitives
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iterator_traits
input_iterator_tag
output_iterator_tag
forward_iterator_tag
bidirectional_iterator_tag
random_access_iterator_tag
iterator
Adaptateurs Iterator
Original:
Iterator adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reverse_iterator
Itérateurs de flux
Original:
Stream iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istream_iterator
ostream_iterator
istreambuf_iterator
ostreambuf_iterator
Opérations Iterator
Original:
Iterator operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
advance
distance
prev (C++11)
next (C++11)
Gamme d'accès
Original:
Range access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
begin (C++11)
end (C++11)
 
std::ostreambuf_iterator
Les fonctions membres
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ostreambuf_iterator::ostreambuf_iterator
ostreambuf_iterator::operator=
ostreambuf_iterator::operator*
ostreambuf_iterator::operator++
ostreambuf_iterator::operator++(int)
ostreambuf_iterator::failed
 
Defined in header <iterator>
template< class CharT, class Traits = std::char_traits<CharT>>

class ostreambuf_iterator : public std::iterator<std::output_iterator_tag,

                                                 void, void, void, void>
std::ostreambuf_iterator est un itérateur de sortie en un seul passage qui écrit caractères successifs dans l'objet std::basic_streambuf pour lequel il est construit. L'opération d'écriture proprement dite s'effectue lorsque l'itérateur (si déréférencé ou non) est assigné. L'incrémentation du std::ostreambuf_iterator est un no-op .
Original:
std::ostreambuf_iterator is a single-pass output iterator that writes successive characters into the std::basic_streambuf object for which it was constructed. The actual write operation is performed when the iterator (whether dereferenced or not) is assigned to. Incrementing the std::ostreambuf_iterator is a no-op.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dans une application typique, les éléments de données sont uniquement des std::ostreambuf_iterator un pointeur vers la std::basic_streambuf associé et un indicateur booléen indiquant si la fin de l'état de fichier a été atteinte .
Original:
In a typical implementation, the only data members of std::ostreambuf_iterator are a pointer to the associated std::basic_streambuf and a boolean flag indicating if the the end of file condition has been reached.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier] Types de membres

Type du membre Définition
char_type CharT
traits_type Traits
streambuf_type std::basic_streambuf<CharT, Traits>
ostream_type std::basic_ostream<CharT, Traits>

[modifier] Fonctions membres

construit un nouveau ostreambuf_iterator
Original:
constructs a new ostreambuf_iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
(destructor)
(implicitement déclaré)
destructs an ostreambuf_iterator
(fonction membre publique)
écrit un caractère à la séquence de sortie associé
Original:
writes a character to the associated output sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
no-op
(fonction membre publique)
no-op
(fonction membre publique)
teste si la sortie a échoué
Original:
tests if output failed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)

Inherited from std::iterator

Member types

Type du membre Définition
value_type void
difference_type void
pointer void
reference void
iterator_category std::output_iterator_tag

[modifier] Exemple

#include <string>
#include <algorithm>
#include <iterator>
#include <iostream>
int main()
{
    std::string s = "This is an example\n";
    std::copy(s.begin(), s.end(), std::ostreambuf_iterator<char>(std::cout));
}

Résultat :

This is an example

[modifier] Voir aussi

itérateur d'entrée qui lit std::basic_streambuf
Original:
input iterator that reads from std::basic_streambuf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique) [edit]
itérateur de sortie qui écrit dans std::basic_ostream
Original:
output iterator that writes to std::basic_ostream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique) [edit]