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. |
<metanoindex/>
<tbody> </tbody>| Dclar dans l'en-tte <streambuf>
|
||
template< class CharT, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT> > class basic_streambuf; |
||
Le
basic_streambuf classe contrle d'entre et de sortie une squence de caractres. Il comprend et permet d'accder la squence de caractres command (le tampon) et, ventuellement, la squence de caractres associe (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 squence d'entre contrle 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 squence de sortie contrle peut pas tre protg 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 reprsentation des caractres et l'encodage de la squence contrle peut tre diffrente de celle des reprsentations de caractres dans la squence associe (une facette locale std::codecvt peut tre ncessaire 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 squence contrle peut tre en mesure d'accder la squence associe 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 squence contrle peuvent imposer des limites arbitraires sur la lecture, l'criture, la recherche, ou ungetting caractres .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 squence de caractres command (le tampon) est un tableau de
CharT qui, en tout temps, reprsente une sous-squence, ou une "fentre" dans la squence de caractres associe. Son tat est dcrit 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.
1)
L pointeur dbut, toujours au plus bas des points de l'lment de tampon
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.
2)
Le pointeur' autre, les points l'lment qui est le prochain candidat lire ou crire
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.
3)
L pointeur extrmit, une pointe aprs la fin de la mmoire 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 infrieure la fin pointeur dans une squence de sortie, une position d'criture' est disponible. Le pointeur suivant peut tre drfrenc 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 infrieure la fin pointeur dans une squence d'entre, un' lire la position est disponible. Le pointeur suivant peut tre drfrenc 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 dbut dans une squence d'entre, une position putback' est disponible, et que le pointeur suivant peut tre dcrment, drfrenc, et attribu , afin de placer un caractre de retour dans la squence d'entre .
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 squence d'entre (dans ce cas, le tampon dcrit au dbut, ct, et la fin des pointeurs est appel' obtenir zone), une squence de sortie (' mettre rgion), ou une entre / squence de sortie. Dans ce dernier cas, six pointeurs sont suivies, qui peuvent pointer vers tous les lments de la matrice de mme 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 dtient que ces pointeurs CharT* six et une copie de std::locale en tant que membres de donnes. Les tampons se sont implmentes par les classes drives 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 bibliothque 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 drivs, 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.
Types de membres
| Type du membre | Dfinition |
char_type
|
CharT
|
traits_type
|
Traits
|
int_type
|
Traits::int_type
|
pos_type
|
Traits::pos_type
|
off_type
|
Traits::off_type
|
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. |
Dtruit 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 caractres disponibles immdiatement 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 progrs de la squence d'entre, puis lit un caractre 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 caractre de la squence d'entre et avance la squence 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 (obsolte) |
les progrs de la squence d'entre, comme si en appelant sbumpc() et en rejetant le rsultat 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 squence de caractres partir de l'entre, sans faire avancer la squence 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 caractre 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 caractre en arrire dans la squence d'entre 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) | |
dplace le pointeur suivant de l'arrire par une squence d'entre 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 protge) | |
(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 protge) |
(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 protge) |
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 paramtres rgionaux associs 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 protge) |
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 dfinie 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 protge) |
[ 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 squence d'entre, la squence 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 protge) |
[ 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 squence d'entre, la squence 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 protge) |
[ 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 squence de caractres associe 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 protge) |
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 caractres disponibles pour l'entre dans la squence d'entre associe, 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 protge) |
[ 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 caractres partir de la squence d'entre associe 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 protge) |
[ 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 caractres partir de la squence d'entre associe 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 protge) |
[ 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 caractres multiples de la squence d'entre 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 protge) |
renvoie un pointeur sur le dbut, le caractre 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 protge) | |
avancer le pointeur suivant de la squence d'entre 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 protge) | |
repositionne le dbut des pointeurs, ct, et la fin de la squence d'entre 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 protge) | |
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 protge) |
[ 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 caractres de la squence 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 protge) |
renvoie un pointeur sur le dbut, le caractre 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 protge) | |
avancer le pointeur suivant de la squence 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 protge) | |
repositionne le dbut des pointeurs, ct, et la fin de la squence 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 protge) | |
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 caractre en arrire dans la squence d'entre, ventuellement de modifier la squence d'entre 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 protge) |