Espaços nominais
Variantes
Acções

std::numpunct

Da cppreference.com
< cpp‎ | locale

 
 
Biblioteca localizações
Localidades e facetas
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
Classificação de caracteres
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversões
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet classes base da categoria
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Categorias faceta
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Específicos da localidade facetas
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facetas de conversão de código
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
C localidade
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
 
Defined in header <locale>
template< class CharT >
class numpunct;
A faceta std::numpunct encapsula as preferências de pontuação numérica. Fluxo de operações I / O uso std::numpunct através std::num_get e std::num_put para analisar entrada numérica e saída formatação numérica.
Original:
The facet std::numpunct encapsulates numeric punctuation preferences. Stream I/O operations use std::numpunct through std::num_get and std::num_put for parsing numeric input and formatting numeric output.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/locale/facetstd-numpunct-inheritance.svg
Sobre esta imagem

Inheritance diagram

Duas especializações são fornecidos pela biblioteca padrão
Original:
Two specializations 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.
Defined in header <locale>
std::numpunct<char>
fornece os equivalentes de "C", as preferências de localidade
Original:
provides equivalents of the "C" locale preferences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::numpunct<wchar_t>
fornece equivalentes caracteres largos de "C" preferências de localidade
Original:
provides wide character equivalents of the "C" locale preferences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Tipos de membro

Tipo de membro
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
char_type charT
string_type std::basic_string<charT>

[editar] Funções de membro

Predefinição:cpp/locale/numpunct/dsc truenamePredefinição:cpp/locale/numpunct/dsc falsename
constrói uma faceta numpunct novo
Original:
constructs a new numpunct facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
destrói uma faceta numpunct
Original:
destructs a numpunct facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(protegido função de membro) [edit]
Invoca do_decimal_point
Original:
invokes do_decimal_point
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
Invoca do_thousands_sep
Original:
invokes do_thousands_sep
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
Invoca do_grouping
Original:
invokes do_grouping
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]

[editar] Protegido funções de membro

Predefinição:cpp/locale/numpunct/dsc do truenamePredefinição:cpp/locale/numpunct/dsc do falsename
fornece o personagem para usar como ponto decimal
Original:
provides the character to use as decimal point
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtual protegido função de membro) [edit]
fornece o personagem para usar como separador de milhares
Original:
provides the character to use as thousands separator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtual protegido função de membro) [edit]
[virtual]
fornece o número de dígitos entre cada par de milhares separadores
Original:
provides the numbers of digits between each pair of thousands separators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtual protegido função de membro) [edit]

[editar] Objetos Membros

static std::locale::id id
' ID da localidade
Original:
id of the locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(objeto membro público)

[editar] Exemplo

O exemplo seguinte altera as representações de seqüência de true e false
Original:
The following example changes the string representations of true and false
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

#include <iostream>
#include <locale>
 
struct french_bool : std::numpunct<char> {
    string_type do_truename() const { return "oui"; }
    string_type do_falsename() const { return "non"; }
};
 
int main()
{
    std::cout << "default locale: "
              << std::boolalpha << true << ", " << false << '\n';
    std::cout.imbue(std::locale(std::cout.getloc(), new french_bool()));
    std::cout << "locale with modified numpunct: "
              << std::boolalpha << true << ", " << false << '\n';
}

Output:

default locale: true, false
locale with modified numpunct: oui, non

[editar] Veja também

cria uma faceta numpunct para a localidade chamada
Original:
creates a numpunct facet for the named locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe)