std::moneypunct
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
| Definido en el archivo de encabezado <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.
Inheritance diagram
La biblioteca estándar proporciona cuatro especializaciones
Definido en el archivo de encabezado
<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 |
Tipos de miembros
| Tipo del miembro | Definition |
char_type
|
charT
|
string_type
|
std::basic_string<charT>
|
Las funciones miembro
| crea una faceta moneypunct (función miembro pública) | |
| destruye una faceta moneypunct (función miembro protegida) | |
Invoca do_decimal_point (función miembro pública) | |
Invoca do_thousands_sep (función miembro pública) | |
Invoca do_grouping (función miembro pública) | |
Invoca do_curr_symbol (función miembro pública) | |
Invoca do_positive_sign (función miembro pública) | |
Invoca do_negative_sign (función miembro pública) | |
Invoca do_frac_digits (función miembro pública) | |
Invoca do_pos_format (función miembro pública) | |
Invoca do_neg_format (función miembro pública) | |
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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
[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. (función miembro virtual protegida) |
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
|
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 público) |
Heredado de 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. |
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";
}
Salida:
japanese currency symbol is JPY or ¥ for short
Ver también
| Define los patrones de formato monetario. (clase) | |
| Representa a la puntuación monetaria (std::moneypunct) suministrada por el sistema para la configuración regional nombrada. (plantilla de clase) | |
| Analiza y construye un valor monetario a partir de una secuencia de caracteres de entrada. (plantilla de clase) | |
| Formatos de un valor monetario para la salida como una secuencia de caracteres. (plantilla de clase) |