xtd 0.2.0
Loading...
Searching...
No Matches
number_styles.h
Go to the documentation of this file.
1
4#pragma once
5#include <type_traits>
6
8namespace xtd {
16 enum class number_styles {
18 none = 0x0,
24 allow_leading_sign = 0b100,
26 allow_trailing_sign = 0b1000,
28 allow_parentheses = 0b10000,
30 allow_decimal_point = 0b100000,
32 allow_thousands = 0b1000000,
34 allow_exponent = 0b10000000,
36 allow_currency_symbol = 0b100000000,
38 allow_hex_specifier = 0b1000000000,
40 allow_binary_specifier = 0b10000000000,
42 allow_octal_specifier = 0b100000000000,
59 };
60
62 [[maybe_unused]] inline number_styles& operator ^=(number_styles& lhs, number_styles rhs) {lhs = static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) ^ static_cast<std::underlying_type<number_styles>::type>(rhs)); return lhs;}
63 [[maybe_unused]] inline number_styles& operator &=(number_styles& lhs, number_styles rhs) {lhs = static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) & static_cast<std::underlying_type<number_styles>::type>(rhs)); return lhs;}
64 [[maybe_unused]] inline number_styles& operator |=(number_styles& lhs, number_styles rhs) {lhs = static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) | static_cast<std::underlying_type<number_styles>::type>(rhs)); return lhs;}
65 [[maybe_unused]] inline number_styles& operator +=(number_styles& lhs, number_styles rhs) {lhs = static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) + static_cast<std::underlying_type<number_styles>::type>(rhs)); return lhs;}
66 [[maybe_unused]] inline number_styles& operator -=(number_styles& lhs, number_styles rhs) {lhs = static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) - static_cast<std::underlying_type<number_styles>::type>(rhs)); return lhs;}
67 [[maybe_unused]] inline number_styles operator ^(number_styles lhs, number_styles rhs) {return static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) ^ static_cast<std::underlying_type<number_styles>::type>(rhs));}
68 [[maybe_unused]] inline number_styles operator &(number_styles lhs, number_styles rhs) {return static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) & static_cast<std::underlying_type<number_styles>::type>(rhs));}
69 [[maybe_unused]] inline number_styles operator |(number_styles lhs, number_styles rhs) {return static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) | static_cast<std::underlying_type<number_styles>::type>(rhs));}
70 [[maybe_unused]] inline number_styles operator +(number_styles lhs, number_styles rhs) {return static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) + static_cast<std::underlying_type<number_styles>::type>(rhs));}
71 [[maybe_unused]] inline number_styles operator -(number_styles lhs, number_styles rhs) {return static_cast<number_styles>(static_cast<std::underlying_type<number_styles>::type>(lhs) - static_cast<std::underlying_type<number_styles>::type>(rhs));}
72 [[maybe_unused]] inline number_styles operator ~(number_styles lhs) {return static_cast<number_styles>(~static_cast<std::underlying_type<number_styles>::type>(lhs));} \
74}
75
76// This file is included before enum definition so the enum_register is in the enum.h file.
number_styles
Determines the styles permitted in numeric string arguments that are passed to the xtd::parse and xtd...
Definition number_styles.h:16
@ allow_thousands
Indicates that the numeric string can have group separators, such as symbols that separate hundreds f...
@ allow_decimal_point
Indicates that the numeric string can have a decimal point. If the number_styles value includes the a...
@ any
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
@ integer
Indicates that the allow_leading_white, allow_trailing_white, and allow_leading_sign styles are used....
@ currency
Indicates that all styles except allow_exponent, allow_hex_specifier, allow_binary_specifier and allo...
@ allow_trailing_sign
Indicates that the numeric string can have a trailing sign. Valid trailing sign characters are determ...
@ allow_leading_sign
Indicates that the numeric string can have a leading sign.
@ allow_parentheses
Indicates that the numeric string can have one pair of parentheses enclosing the number....
@ binary_number
Indicates that the allow_leading_white, allow_trailing_white, and allow_binary_specifier styles are u...
@ allow_exponent
Indicates that the numeric string can be in exponential notation. The allow_exponent flag allows the ...
@ allow_hex_specifier
Indicates that the numeric string represents a hexadecimal value. Valid hexadecimal values include th...
@ fixed_point
Indicates that the allow_leading_white, allow_trailing_white, allow_leading_sign, allow_decimal_point...
@ allow_octal_specifier
Indicates that the numeric string represents a octal value. Valid octal values include the numeric di...
@ allow_leading_white
Indicates that leading white-space characters can be present in the parsed string....
@ octal_number
Indicates that the allow_leading_white, allow_trailing_white, and allow_octal_specifier styles are us...
@ number
Indicates that the allow_leading_white, allow_trailing_white, allow_leading_sign, allow_trailing_sign...
@ allow_trailing_white
Indicates that trailing white-space characters can be present in the parsed string....
@ allow_currency_symbol
Indicates that the numeric string can contain a currency symbol. Valid currency symbols are determine...
@ hex_number
Indicates that the allow_leading_white, allow_trailing_white, and allow_hex_specifier styles are used...
@ allow_binary_specifier
Indicates that the numeric string represents a binary value. Valid binary values include the numeric ...
@ none
No modifier key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10