std::moneypunct
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. |
| Defined in header <locale>
|
||
| template< class CharT, bool International = false > class moneypunct; |
||
La faceta std::moneypunct encapsula las preferencias de formato de valores en moneda. Los manipuladores de Entrada y Salida de stream std::get_money y std::put_money usan std::moneypunct a través de std::money_get y std::money_put para analizar los datos en formato monetario de entrada y para dar formato monetario a los datos numéricos de salida.
La biblioteca estándar proporciona cuatro especializaciones
| Defined in header
<locale> | |
| std::moneypunct<char> | proporciona equivalentes de las preferencias de localización "C" |
| std::moneypunct<wchar_t> | proporciona equivalentes de las preferencias de localización "C" en carácter ancho |
| std::moneypunct<char, true> | proporciona equivalentes de las preferencias de localización "C", con símbolos internacionales de divisas |
| std::moneypunct<wchar_t, true> | proporciona equivalentes de carácter ancho de las preferencias de localización "C", con símbolos internacionales de divisas |
Contenido |
[editar] Tipos de miembros
| Tipo del miembro | Definition |
char_type
|
charT
|
string_type
|
std::basic_string<charT> |
[editar] Las funciones miembro
| crea una faceta moneypunct (miembro público función) | |
| destruye una faceta moneypunct (protegidos función miembro) | |
| | |
Invoca do_decimal_point (miembro público función) | |
Invoca do_thousands_sep (miembro público función) | |
Invoca do_grouping (miembro público función) | |
Invoca do_curr_symbol (miembro público función) | |
Invoca do_positive_sign (miembro público función) | |
Invoca do_negative_sign (miembro público función) | |
Invoca do_frac_digits (miembro público función) | |
Invoca do_pos_format (miembro público función) | |
Invoca do_neg_format (miembro público función) | |
[editar] Protegido funciones miembro
| [virtual] |
proporciona el carácter que se utiliza como punto 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. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona el carácter que se utiliza como separador de miles 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. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona el número de dígitos entre cada par de separadores de miles 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. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona la cadena que se utiliza como el identificador de moneda Original: provides the string to use as the currency identifier The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona la cadena para indicar un valor positivo Original: provides the string to indicate a positive value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona la cadena para indicar un valor negativo Original: provides the string to indicate a negative value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona el número de dígitos a mostrar después del punto decimal Original: provides the number of digits to display after the decimal point The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona el patrón de formato para los valores positivos Original: provides the formatting pattern for positive values The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
proporciona el patrón de formato para los valores negativos Original: provides the formatting pattern for negative values The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
[editar] Constantes de miembros
| Miembro
Original: Member The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
const bool intl (estático)
|
International
|
[editar] Objetos miembros
| static std::locale::id id |
Identificador de la configuración regional 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 miembro del público) |
Inherited from std::money_base
| Miembro de tipo
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 |
| enum part { none, space, symbol, sign, value }; | tipo de enumeración sin ámbito
Original: unscoped enumeration type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| struct pattern { char field[4]; }; | el tipo de formato monetario
Original: the monetary format type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| Enumeración constante
Original: Enumeration constant The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
none
|
espacios en blanco se permite pero no es obligatorio, excepto en la última posición, donde los espacios en blanco no está permitido
Original: whitespace is permitted but not required except in the last position, where whitespace is not permitted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
space
|
uno o más espacios en blanco son necesarios
Original: one or more whitespace characters are required The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
symbol
|
la secuencia de caracteres devuelto por moneypunct :: curr_symbol se requiere
Original: the sequence of characters returned by moneypunct::curr_symbol is required The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
sign
|
el primero de los caracteres devueltos por moneypunct :: positive_sign o moneypunct :: negative_sign se requiere
Original: the first of the characters returned by moneypunct::positive_sign or moneypunct::negative_sign is required The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
value
|
el valor monetario absoluto numérico es necesario
Original: the absolute numeric monetary value is required The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Ejemplo
#include <iostream> #include <locale> int main() { std::locale jp("ja_JP.UTF-8"); std::cout << "japanese currency symbol is " << std::use_facet<std::moneypunct<char, true>>(jp).curr_symbol() << "or " << std::use_facet<std::moneypunct<char>>(jp).curr_symbol() << " for short\n"; }
Output:
japanese currency symbol is JPY or ¥ for short
[editar] Ver también
| define los patrones de formato monetario Original: defines monetary formatting patterns The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) | |
| representa el sistema suministrado por std::moneypunct para la localidad nombrada Original: represents the system-supplied std::moneypunct 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. (clase de plantilla) | |
| analiza y construye un valor monetario a partir de una secuencia 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. (clase de plantilla) | |
| formatos de un valor monetario para la salida como una secuencia de caracteres Original: formats a monetary value for output as a character sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) | |
