HikoGUI
A low latency retained GUI
|
Functions implementing the unicode-plural rules. More...
#include "../utility/utility.hpp"
#include "../i18n/i18n.hpp"
#include "../macros.hpp"
#include <concepts>
#include <array>
#include <cstdint>
#include <cstddef>
#include <bit>
Go to the source code of this file.
Data Structures | |
struct | hi::v1::plurality |
Plurality of a number. More... | |
struct | hi::v1::detail::plural_operand |
The operand for the unicode-plural rules. More... | |
Namespaces | |
namespace | hi |
The HikoGUI namespace. | |
namespace | hi::v1 |
The HikoGUI API version 1. | |
Typedefs | |
using | hi::v1::detail::cardinal_plural_fptr = plurality (*)(plural_operand) |
Enumerations | |
enum class | hi::v1::plurality_value : uint8_t { hi::v1::zero = 0 , hi::v1::one = 1 , hi::v1::two = 2 , hi::v1::few = 3 , hi::v1::many = 4 , hi::v1::other = 5 } |
The plurality value of a cardinal or ordinal number. More... | |
enum class | hi::v1::plurality_mask : uint8_t { hi::v1::zero = 1 << std::to_underlying(plurality_value::zero) , hi::v1::one = 1 << std::to_underlying(plurality_value::one) , hi::v1::two = 1 << std::to_underlying(plurality_value::two) , hi::v1::few = 1 << std::to_underlying(plurality_value::few) , hi::v1::many = 1 << std::to_underlying(plurality_value::many) , hi::v1::other = 1 << std::to_underlying(plurality_value::other) } |
A mask of plurality values that this language supports. More... | |
Functions | |
hi_export_module (hikogui.unicode.unicode_plural) | |
constexpr plurality_mask | hi::v1::operator| (plurality_mask const &lhs, plurality_mask const &rhs) noexcept |
Or plurality masks together. | |
constexpr plurality | hi::v1::detail::cardinal_plural_bambara (plural_operand) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_cebuano (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_central_atlas_tamazight (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_icelandic (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_akan (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_afrikaans (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_latvian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_colognian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_inari_sami (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_belarusian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_polish (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_lithuanian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_bosnian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_tachelhit (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_moldavian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_czech (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_manx (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_scottish_gaelic (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_breton (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_lower_sorbian (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_hebrew (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_maltese (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_irish (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_arabic (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_welsh (plural_operand op) noexcept |
constexpr plurality | hi::v1::detail::cardinal_plural_cornish (plural_operand op) noexcept |
constexpr auto | hi::v1::detail::cardinal_plural_table_init () noexcept |
constexpr plurality | hi::v1::cardinal_plural (language_tag language, std::integral auto n) noexcept |
Get plural information of a number in a given language. | |
constexpr size_t | hi::v1::cardinal_plural (language_tag language, std::integral auto n, size_t size) noexcept |
Get an index into message plural-variants for a given number. | |
Variables | |
constexpr auto | hi::v1::detail::cardinal_plural_table = cardinal_plural_table_init() |
Functions implementing the unicode-plural rules.
See: https://www.unicode.org/cldr/cldr-aux/charts/35/supplemental/language_plural_rules.html