Espaços nominais
Variantes
Acções

std::money_put

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.
 
std::money_put
Funções de membro
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.
money_put::money_put
money_put::~money_put
money_put::put
money_put::do_put
 
Defined in header <locale>
template<

    class CharT,
    class OutputIt = std::ostreambuf_iterator<CharT>

> class money_put;
Classe std::money_put encapsula as regras para a formatação de valores monetários como strings. O std::put_money manipulador padrão de I / O utiliza a faceta std::money_put da localidade do fluxo de I / O de.
Original:
Class std::money_put encapsulates the rules for formatting monetary values as strings. The standard I/O manipulator std::put_money uses the std::money_put facet of the I/O stream's locale.
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-money put-inheritance.svg
Sobre esta imagem

Inheritance diagram

Índice

[editar] Requisitos de tipo

-
InputIt must meet the requirements of InputIterator.

[editar] Especializações

Duas especializações e duas especializações parciais são fornecidos pela biblioteca padrão e são implementadas por todos os objetos localidade criado em um programa em C + +:
Original:
Two specializations and two partial specializations are provided by the standard library and are implemented by all locale objects created in a C++ program:
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::money_put<char>
cria representações de seqüência estreitas de valores monetários
Original:
creates narrow string representations of monetary values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<wchar_t>
cria representações de seqüência de grandes valores monetários
Original:
creates wide string representations of monetary values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<char, OutputIt>
cria representações de seqüência estreitas de valores monetários usando iterador de saída personalizado
Original:
creates narrow string representations of monetary values using custom output iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<wchar_t, OutputIt>
cria representações de seqüência de grandes valores monetários usando iterador de saída personalizado
Original:
creates wide string representations of monetary values using custom output iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[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>
iter_type OutputIt

[editar] Funções de membro

constrói uma faceta money_put novo
Original:
constructs a new money_put 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)
destrói uma faceta money_put
Original:
destructs a money_put 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)
Invoca do_put
Original:
invokes do_put
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)

[editar] Protegido funções de membro

[virtual]
formata um valor monetário e escreve para fluxo de saída
Original:
formats a monetary value and writes to output stream
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)

[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

#include <iostream>
#include <locale>
#include <iomanip>
#include <iterator>
int main()
{
    // using the IO manipulator
    std::cout.imbue(std::locale("en_US.UTF-8"));
    std::cout << "american locale: "
               << std::showbase << std::put_money(12345678.9)<< '\n';
 
    // using the facet directly
    std::cout.imbue(std::locale("de_DE"));
    std::cout << "german locale: " ;
    std::ostreambuf_iterator<char> out(std::cout);
    auto& f = std::use_facet<std::money_put<char>>(std::cout.getloc());
    f.put(out, false, std::cout, std::cout.fill(), 12345678.9 );
    std::cout << '\n';
}

Output:

american locale: $123,456.79
german locale: 123.456,79 EUR

[editar] Veja também

define parâmetros de formatação monetários utilizados por std::money_get e std::money_put
Original:
defines monetary formatting parameters used by std::money_get and std::money_put
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) [edit]
analisa e constrói um valor monetário a partir de uma seqüência de caracteres de entrada
Original:
parses and constructs a monetary value from an input character sequence
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) [edit]
(C++11)
formatos e saídas de um valor monetário
Original:
formats and outputs a monetary value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função)