xtd 0.2.0
enum_set_attribute.h
Go to the documentation of this file.
1 #pragma once
5 #include "enum_attribute.h"
6 
8 namespace xtd {
28  template<typename enum_t>
48  explicit operator auto() const noexcept {return xtd::enum_attribute::standard;}
49  };
50 }
51 
53 template<> struct xtd::enum_register<xtd::enum_attribute> {
54  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::enum_attribute> {{enum_attribute::standard, "standard"}, {enum_attribute::flags, "flags"}};}
55 };
56 
57 template<> struct xtd::enum_set_attribute<xtd::number_styles> {
58  explicit operator auto() const noexcept {return xtd::enum_attribute::flags;}
59 };
60 
61 template<> struct xtd::enum_register<xtd::number_styles> {
62  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::number_styles> {{xtd::number_styles::none, "none"}, {xtd::number_styles::allow_leading_white, "allow_leading_white"}, {xtd::number_styles::allow_trailing_white, "allow_trailing_white"}, {xtd::number_styles::allow_leading_sign, "allow_leading_sign"}, {xtd::number_styles::allow_trailing_sign, "allow_trailing_sign"}, {xtd::number_styles::allow_parentheses, "allow_parentheses"}, {xtd::number_styles::allow_decimal_point, "allow_decimal_point"}, {xtd::number_styles::allow_thousands, "allow_thousands"}, {xtd::number_styles::allow_exponent, "allow_exponent"}, {xtd::number_styles::allow_currency_symbol, "allow_currency_symbol"}, {xtd::number_styles::allow_hex_specifier, "allow_hex_specifier"}, {xtd::number_styles::allow_binary_specifier, "allow_binary_specifier"}, {xtd::number_styles::allow_octal_specifier, "allow_octal_specifier"}, {xtd::number_styles::integer, "integer"}, {xtd::number_styles::number, "number"}, {xtd::number_styles::fixed_point, "fixed_point"}, {xtd::number_styles::currency, "currency"}, {xtd::number_styles::any, "any"}, {xtd::number_styles::hex_number, "hex_number"}, {xtd::number_styles::binary_number, "binary_number"}, {xtd::number_styles::octal_number, "octal_number"}};}
63 };
64 
65 template<> struct xtd::enum_register<xtd::string_comparison> {
66  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::string_comparison> {{xtd::string_comparison::ordinal, "ordinal"}, {xtd::string_comparison::ordinal_ignore_case, "ordinal_ignore_case"}};}
67 };
68 
69 template<> struct xtd::enum_register<xtd::string_split_options> {
70  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::string_split_options> {{xtd::string_split_options::none, "none"}, {xtd::string_split_options::remove_empty_entries, "remove_empty_entries"}};}
71 };
Indicates that the allow_leading_white, allow_trailing_white, and allow_hex_specifier styles are used...
enum_attribute
Specifies the enum attribute.
Definition: enum_attribute.h:20
Indicates that the numeric string can have a decimal point. If the number_styles value includes the a...
Enum flags attribute.
string_split_options
Specifies whether applicable xtd::ustring::split method overloads include or omit empty substrings fr...
Definition: string_split_options.h:14
Indicates that the numeric string can have group separators, such as symbols that separate hundreds f...
Indicates that the numeric string can have one pair of parentheses enclosing the number. The parentheses indicate that the string to be parsed represents a negative number.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::enum_attribute enum class.
Compare strings using ordinal (binary) sort rules.
Indicates that the allow_leading_white, allow_trailing_white, allow_leading_sign, allow_trailing_sign...
Indicates that the numeric string can be in exponential notation. The allow_exponent flag allows the ...
Indicates that the allow_leading_white, allow_trailing_white, and allow_binary_specifier styles are u...
string_comparison
Specifies the culture, case, and sort rules to be used by certain overloads of the xtd::ustring::comp...
Definition: string_comparison.h:14
Indicates that trailing white-space characters can be present in the parsed string. Valid white-space characters have the Unicode values U+0009, U+000A, U+000B, U+000C, U+000D, and U+0020. Note that this is a subset of the characters for which the std::isspace(char) method returns true.
std::vector< std::pair< enum_t, xtd::ustring > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition: enum_collection.h:19
Indicates that no style elements, such as leading or trailing white space, thousands separators...
Indicates that the allow_leading_white, allow_trailing_white, and allow_leading_sign styles are used...
Indicates that leading white-space characters can be present in the parsed string. Valid white-space characters have the Unicode values U+0009, U+000A, U+000B, U+000C, U+000D, and U+0020. Note that this is a subset of the characters for which the std::isspace(char) method returns true.
Indicates that the numeric string can have a trailing sign. Valid trailing sign characters are determ...
Provides the set attribute struct for enumerations.
Definition: enum_set_attribute.h:29
Indicates that the numeric string represents a hexadecimal value. Valid hexadecimal values include th...
Indicates that the allow_leading_white, allow_trailing_white, allow_leading_sign, allow_decimal_point...
Indicates that the numeric string represents a octal value. Valid octal values include the numeric di...
The return value includes array elements that contain an empty string.
Indicates that all styles except allow_exponent, allow_hex_specifier, allow_binary_specifier and allo...
Indicates that the allow_leading_white, allow_trailing_white, and allow_octal_specifier styles are us...
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
Indicates that the numeric string can contain a currency symbol. Valid currency symbols are determine...
Compare strings using ordinal (binary) sort rules and ignoring the case of the strings being compared...
Indicates that the numeric string represents a binary value. Valid binary values include the numeric ...
Enum standard attribute. The default value.
Indicates that the numeric string can have a leading sign.
The return value does not include array elements that contain an empty string.
number_styles
Determines the styles permitted in numeric string arguments that are passed to the xtd::parse and xtd...
Definition: number_styles.h:16
Provides the registration struct for enumerations.
Definition: enum_register.h:36