xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
number_styles.h
Go to the documentation of this file.
1 #pragma once
5 
7 namespace xtd {
15  enum class number_styles {
17  none = 0x0,
19  allow_leading_white = 0b1,
21  allow_trailing_white = 0b10,
23  allow_leading_sign = 0b100,
25  allow_trailing_sign = 0b1000,
27  allow_parentheses = 0b10000,
29  allow_decimal_point = 0b100000,
31  allow_thousands = 0b1000000,
33  allow_exponent = 0b10000000,
35  allow_currency_symbol = 0b100000000,
37  allow_hex_specifier = 0b1000000000,
39  allow_binary_specifier = 0b10000000000,
41  allow_octal_specifier = 0b100000000000,
58  };
59 
61  inline xtd::number_styles& operator^=(xtd::number_styles& lhs, xtd::number_styles rhs) {lhs = static_cast<xtd::number_styles>(static_cast<int>(lhs) ^ static_cast<int>(rhs)); return lhs;}
62  inline xtd::number_styles& operator&=(xtd::number_styles& lhs, xtd::number_styles rhs) {lhs = static_cast<xtd::number_styles>(static_cast<int>(lhs) & static_cast<int>(rhs)); return lhs;}
63  inline xtd::number_styles& operator|=(xtd::number_styles& lhs, xtd::number_styles rhs) {lhs = static_cast<xtd::number_styles>(static_cast<int>(lhs) | static_cast<int>(rhs)); return lhs;}
64  inline xtd::number_styles& operator+=(xtd::number_styles& lhs, xtd::number_styles rhs) {lhs = static_cast<xtd::number_styles>(static_cast<int>(lhs) + static_cast<int>(rhs)); return lhs;}
65  inline xtd::number_styles& operator-=(xtd::number_styles& lhs, xtd::number_styles rhs) {lhs = static_cast<xtd::number_styles>(static_cast<int>(lhs) - static_cast<int>(rhs)); return lhs;}
66 
67  inline xtd::number_styles operator^(xtd::number_styles lhs, xtd::number_styles rhs) {return static_cast<xtd::number_styles>(static_cast<int>(lhs) ^ static_cast<int>(rhs));}
68  inline xtd::number_styles operator&(xtd::number_styles lhs, xtd::number_styles rhs) {return static_cast<xtd::number_styles>(static_cast<int>(lhs) & static_cast<int>(rhs));}
69  inline xtd::number_styles operator|(xtd::number_styles lhs, xtd::number_styles rhs) {return static_cast<xtd::number_styles>(static_cast<int>(lhs) | static_cast<int>(rhs));}
70  inline xtd::number_styles operator+(xtd::number_styles lhs, xtd::number_styles rhs) {return static_cast<xtd::number_styles>(static_cast<int>(lhs) + static_cast<int>(rhs));}
71  inline xtd::number_styles operator-(xtd::number_styles lhs, xtd::number_styles rhs) {return static_cast<xtd::number_styles>(static_cast<int>(lhs) - static_cast<int>(rhs));}
72 
73  inline xtd::number_styles operator~(xtd::number_styles lhs) {return static_cast<xtd::number_styles>(~static_cast<int>(lhs));}
75 }
number_styles
Determines the styles permitted in numeric string arguments that are passed to the xtd::parse and xtd...
Definition: number_styles.h:15
@ 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.
@ none
Indicates that no style elements, such as leading or trailing white space, thousands separators,...
@ 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 ...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17