std::basic_streambuf
De cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Déclaré dans l'en-tête <streambuf>
|
||
template< class CharT, |
||
Le
basic_streambuf
classe contrôle d'entrée et de sortie à une séquence de caractères. Il comprend et permet d'accéder à la séquence de caractères commandé (le tampon) et, éventuellement, la séquence de caractères associée (fichier, I / O flux, socket TCP, etc) . Original:
The class
basic_streambuf
controls input and output to a character sequence. It includes and provides access to the controlled character sequence (the buffer) and, optionally, the associated character sequence (file, I/O stream, TCP socket, etc). The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Il prend en charge les contraintes suivantes:
Original:
It supports the following constraints:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- la séquence d'entrée contrôlée peut ne pas être lisible .Original:the controlled input sequence may not be readable.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la séquence de sortie contrôlée peut pas être protégé en écriture .Original:the controlled output sequence may not be writeable.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la représentation des caractères et l'encodage de la séquence contrôlée peut être différente de celle des représentations de caractères dans la séquence associée (une facette locale std::codecvt peut être nécessaire d'effectuer la conversion)Original:the character representation and encoding in the controlled sequence may be different from the character representations in the associated sequence (a std::codecvt locale facet may be necessary to perform the conversion)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la séquence contrôlée peut être en mesure d'accéder à la séquence associée directement .Original:the controlled sequence may be able to access the associated sequence directly.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la séquence contrôlée peuvent imposer des limites arbitraires sur la lecture, l'écriture, la recherche, ou ungetting caractères .Original:the controlled sequence may impose arbitrary limitations on reading, writing, seeking, or ungetting characters.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La séquence de caractères commandé (le tampon) est un tableau de
1) CharT
qui, en tout temps, représente une sous-séquence, ou une "fenêtre" dans la séquence de caractères associée. Son état est décrit par trois pointeurs:Original:
The controlled character sequence (the buffer) is an array of
CharT
which, at all times, represents a subsequence, or a "window" into the associated character sequence. Its state is described by three pointers:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
L pointeur début, toujours au plus bas des points de l'élément de tampon
2) Original:
The beginning pointer, always points at the lowest element of the buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Le pointeur' autre, les points à l'élément qui est le prochain candidat à lire ou à écrire
3) Original:
The next pointer, points at the element that is the next candidate for reading or writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
L pointeur extrémité, une pointe après la fin de la mémoire tampon .
Original:
The end pointer, points one past the end of the buffer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Si le pointeur suivant est inférieure à la fin pointeur dans une séquence de sortie, une position d'écriture' est disponible. Le pointeur suivant peut être déréférencé et affecté à .
Original:
If the next pointer is less than the end pointer in an output sequence, a write position is available. The next pointer can be dereferenced and assigned to.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Si le pointeur suivant est inférieure à la fin pointeur dans une séquence d'entrée, un' lire la position est disponible. Le pointeur suivant peut être déréférencé et lire .
Original:
If the next pointer is less than the end pointer in an input sequence, a read position is available. The next pointer can be dereferenced and read from.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Si le pointeur suivant est plus grand que le pointeur de début dans une séquence d'entrée, une position putback' est disponible, et que le pointeur suivant peut être décrémenté, déréférencé, et attribué à, afin de placer un caractère de retour dans la séquence d'entrée .
Original:
If the next pointer is greater than the beginning pointer in an input sequence, a putback position is available, and the next pointer may be decremented, dereferenced, and assigned to, in order to put a character back into the input sequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Un objet
basic_streambuf
peut soutenir une séquence d'entrée (dans ce cas, le tampon décrit au début, à côté, et à la fin des pointeurs est appelé' obtenir zone), une séquence de sortie (' mettre région), ou une entrée / séquence de sortie. Dans ce dernier cas, six pointeurs sont suivies, qui peuvent pointer vers tous les éléments de la matrice de même nature ou de deux ensembles individuels .Original:
A
basic_streambuf
object may support an input sequence (in which case the buffer described by the beginning, next, and end pointers is called get area), an output sequence (put area), or an input/output sequence. In latter case, six pointers are tracked, which may all point to elements of the same character array or two individual arrays.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Mise en œuvre typique de la classe de base
std::basic_streambuf
ne détient que ces pointeurs CharT*
six et une copie de std::locale en tant que membres de données. Les tampons se sont implémentées par les classes dérivées telles que std::basic_filebuf ou std::basic_stringbuf .Original:
Typical implementation of the
std::basic_streambuf
base class holds only these six CharT*
pointers and a copy of std::locale as data members. The buffers themselves are implemented by the derived classes such as std::basic_filebuf or std::basic_stringbuf.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
This section is incomplete Reason: Consistent terminology across the pages. Probably input/output sequence, get/put area, etc. |
Deux typedefs commodité sont fournis par la bibliothèque standard
Original:
Two convenience typedefs are provided by the standard library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Defined in header
<streambuf> | |
Type d'
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
streambuf
|
basic_streambuf<char> |
wstreambuf
|
basic_streambuf<wchar_t> |
Les objets de flux d'E / S std::basic_istream, std::basic_ostream et dérivés, sont mis en œuvre exclusivement en termes de std::basic_streambuf .
Original:
The I/O stream objects std::basic_istream, std::basic_ostream, and derived, are implemented entirely in terms of 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.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Types de membres
Type du membre | Définition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
[modifier] Fonctions membres
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Détruit l'objet basic_streambuf Original: destructs the basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (function membre virtuelle publique) |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Invoque imbue() Original: invokes imbue() 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) | |
obtient une copie de l'environnement local associé Original: obtains a copy of the associated locale 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) | |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Invoque setbuf() Original: invokes setbuf() 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) | |
Invoque seekoff() Original: invokes seekoff() 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) | |
Invoque seekpos() Original: invokes seekpos() 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) | |
Invoque sync() Original: invokes sync() 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) | |
Original: Get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
obtient le nombre de caractères disponibles immédiatement dans la zone d'obtention Original: obtains the number of characters immediately available in the get area 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) | |
les progrès de la séquence d'entrée, puis lit un caractère sans avancer de nouveau Original: advances the input sequence, then reads one character without advancing again 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) | |
lit un caractère de la séquence d'entrée et avance la séquence Original: reads one character from the input sequence and advances the 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) | |
stossc (obsolète) |
les progrès de la séquence d'entrée, comme si en appelant sbumpc() et en rejetant le résultat Original: advances the input sequence as if by calling sbumpc() and discarding the result 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) |
lire une séquence de caractères à partir de l'entrée, sans faire avancer la séquence Original: reads one character from the input sequence without advancing the 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) | |
Invoque xsgetn() Original: invokes xsgetn() 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) | |
Original: Put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
écrit un caractère vers la zone de mise et avance le pointeur suivant Original: writes one character to the put area and advances the next pointer 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) | |
Invoque xsputn() Original: invokes xsputn() 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) | |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
met un caractère en arrière dans la séquence d'entrée Original: puts one character back in the input 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) | |
déplace le pointeur suivant de l'arrière par une séquence d'entrée Original: moves the next pointer in the input sequence back by one 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) | |
Original: Protected member functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
construit un objet basic_streambuf Original: constructs a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre protégée) | |
(C++11) |
remplace un objet basic_streambuf Original: replaces a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre protégée) |
(C++11) |
swaps de deux objets basic_streambuf Original: swaps two basic_streambuf objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre protégée) |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
modifie les paramètres régionaux associés Original: changes the associated locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
remplace le tampon de matrice définie par l'utilisateur, si cela est autorisé Original: replaces the buffer with user-defined array, if permitted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
repositionne le pointeur suivant de la séquence d'entrée, la séquence de sortie, ou les deux, en utilisant un adressage relatif Original: repositions the next pointer in the input sequence, output sequence, or both, using relative addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
repositionne le pointeur suivant de la séquence d'entrée, la séquence de sortie, ou les deux en utilisant l'adressage absolu Original: repositions the next pointer in the input sequence, output sequence, or both using absolute addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
synchronise les tampons avec la séquence de caractères associée Original: synchronizes the buffers with the associated character 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 virtuelle protégée) |
Original: Get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
obtient le nombre de caractères disponibles pour l'entrée dans la séquence d'entrée associée, si elle est connue Original: obtains the number of characters available for input in the associated input sequence, if known The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
lit les caractères à partir de la séquence d'entrée associée à la zone d'obtention Original: reads characters from the associated input sequence to the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
lit les caractères à partir de la séquence d'entrée associée à la zone get et avance le pointeur suivant Original: reads characters from the associated input sequence to the get area and advances the next pointer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
lit les caractères multiples de la séquence d'entrée Original: reads multiple characters from the input 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 virtuelle protégée) |
renvoie un pointeur sur le début, le caractère courant et la fin de la zone d'obtention Original: returns a pointer to the beginning, current character and the end of the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre protégée) | |
avancer le pointeur suivant de la séquence d'entrée Original: advances the next pointer in the input 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 protégée) | |
repositionne le début des pointeurs, à côté, et à la fin de la séquence d'entrée Original: repositions the beginning, next, and end pointers of the input 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 protégée) | |
Original: Put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
writes multiple characters to the output sequence (fonction membre virtuelle protégée) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
écrit des caractères de la séquence de sortie associé à partir de la zone de vente Original: writes characters to the associated output sequence from the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre virtuelle protégée) |
renvoie un pointeur sur le début, le caractère courant et la fin de la zone de mise Original: returns a pointer to the beginning, current character and the end of the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre protégée) | |
avancer le pointeur suivant de la séquence de sortie Original: advances the next pointer of the 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 protégée) | |
repositionne le début des pointeurs, à côté, et à la fin de la séquence de sortie Original: repositions the beginning, next, and end pointers of the 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 protégée) | |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
met un caractère en arrière dans la séquence d'entrée, éventuellement de modifier la séquence d'entrée Original: puts a character back into the input sequence, possibly modifying the input 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 virtuelle protégée) |