Пространства имён
Варианты
Действия

std::moneypunct

Материал из cppreference.com

 
 
Локализация библиотеки
Языки и граней
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
Персонаж классификации
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.
Преобразования
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 классов категории базу
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.
Facet категорий
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.
Язык конкретных аспектов
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.
Код аспекты преобразования
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 локали
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.
 
 
Заголовочный файл <locale>
template< class CharT, bool International = false >
class moneypunct;
Гранью std::moneypunct инкапсулирует денежные преференции формат значения. Поток ввода / вывода манипуляторы std::get_money и std::put_money использования std::moneypunct через std::money_get и std::money_put для анализа денежно входного значения и форматирование денежной выходное значение.
Original:
The facet std::moneypunct encapsulates monetary value format preferences. Stream I/O manipulators std::get_money and std::put_money use std::moneypunct through std::money_get and std::money_put for parsing monetary value input and formatting monetary value 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/money basecpp/locale/locale/facetstd-moneypunct-inheritance.svg
Описание изображения

Диаграмма наследования

Четыре специализации осуществляется стандартной библиотеки
Original:
Four 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.
Определено в файле <locale>
std::moneypunct<char>
предоставляет эквиваленты "C" локали предпочтений
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::moneypunct<wchar_t>
предоставляет широкий эквиваленты характер "C" локали предпочтений
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.
std::moneypunct<char, true>
предоставляет эквиваленты "C" локали предпочтений, с международными символами валюты
Original:
provides equivalents of the "C" locale preferences, with international currency symbols
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::moneypunct<wchar_t, true>
предоставляет широкий эквиваленты характер "C" локали предпочтений, с международными символами валюты
Original:
provides wide character equivalents of the "C" locale preferences, with international currency symbols
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Содержание

[править] Член типов

Член типа
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>

[править] Член функций

строит новую грань moneypunct
Original:
constructs a new moneypunct facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)
разрушает moneypunct грань
Original:
destructs a moneypunct facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(protected функция-член)
Вызывает 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.

(public функция-член)
Вызывает 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.

(public функция-член)
Вызывает 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.

(public функция-член)
Вызывает do_curr_symbol
Original:
invokes do_curr_symbol
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)
Вызывает do_positive_sign
Original:
invokes do_positive_sign
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)
Вызывает do_negative_sign
Original:
invokes do_negative_sign
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)
Вызывает do_frac_digits
Original:
invokes do_frac_digits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)
Вызывает do_pos_format
Original:
invokes do_pos_format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)
Вызывает do_neg_format
Original:
invokes do_neg_format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)

[править] Охраняемые функций-членов

обеспечивает характера для использования в качестве десятичной точки
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 protected функция-член)
обеспечивает знак, используемый в качестве разделителя тысяч
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 protected функция-член)
[virtual]
обеспечивает количество цифр между каждой парой тысяч сепараторов
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 protected функция-член)
предоставляет строку, используемую в качестве валюты идентификатор
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.

(virtual protected функция-член)
предоставляет строку, чтобы указать положительное значение
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.

(virtual protected функция-член)
предусматривает строки для указания отрицательного значения
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.

(virtual protected функция-член)
обеспечивает количество цифр для отображения после запятой
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.

(virtual protected функция-член)
обеспечивает форматирование шаблона для положительных значений
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.

(virtual protected функция-член)
обеспечивает форматирование шаблона для отрицательных значений
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.

(virtual protected функция-член)

[править] Член постоянных

Члены
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 (статическим) International

[править] Член объектов

static std::locale::id id
' Идентификатор локали
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.

(public объект-член)

Унаследован от std::money_base

Член типа
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 };
незаданной типа перечисления
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]; };
Тип денежной форме
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.
Перечисление постоянно
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
пробелов разрешено, но не требуется, за исключением последней позиции, где пробелы не допускаются
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
один или несколько пробельных символов не требуется
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
последовательность символов, возвращаемых moneypunct :: curr_symbol не требуется
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
Первое из символов, возвращаемых moneypunct :: positive_sign или moneypunct :: negative_sign не требуется
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
абсолютных числовых денежной стоимости не требуется
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.

[править] Пример

#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";
}

Вывод:

japanese currency symbol is JPY or ¥ for short

[править] См. также

определяет денежно шаблоны форматирования
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.

(класс) [edit]
представляет собой систему поставляемых std::moneypunct для указанного языка
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.

(шаблон класса) [edit]
анализирует и строит в денежном выражении от последовательности ввода символов
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.

(шаблон класса) [edit]
Форматы денежную стоимость выводится в виде последовательности символов
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.

(шаблон класса) [edit]