FURY class definition of unit symbol with float128 kind.
FURY class implementation of unit symbol with generic kind.
Unit of measure (UOM) symbol.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(uom_converter), | private, | allocatable | :: | convert_ | Generic conversion alias formula user-supplied. |
||
| integer(kind=IKP), | private | :: | exponent_ | = | 1_IKP | Exponent of the symbol, e.g. "-1" for Hertz, namely "s-1". |
|
| real(kind=RKP), | private | :: | factor_ | = | 1._RKP | Symbol multiplicative scale factor (used only for converters). |
|
| real(kind=RKP), | private | :: | offset_ | = | 0._RKP | Symbol additive offset (used only for converters). |
|
| type(string), | private | :: | symbol_ | literal symbol, e.g. "m" for metres. |
| procedure, public, pass(self) :: convert | Convert a magnitude with respect symbol definition. |
| procedure, public, pass(self) :: get_convert | Return the symbol generic conversion alias. |
| procedure, public, pass(self) :: get_exponent | Return the symbol exponent. |
| procedure, public, pass(self) :: get_factor | Return the symbol factor. |
| procedure, public, pass(self) :: get_offset | Return the symbol offset. |
| procedure, public, pass(self) :: get_symbol | Return the literal symbol. |
| procedure, public, pass(self) :: is_defined | Check if the symbol is defined. |
| procedure, public, pass(self) :: parse | Parse symbol from string. |
| procedure, public, pass(self) :: prefixed | Return a prefixed symbol. |
| procedure, public, pass(self) :: set | Set symbol. |
| procedure, public, pass(self) :: stringify | Return a string representaion of the symbol. |
| procedure, public, pass(self) :: unset | Unset symbol. |
| generic, public :: assignment(=) => assign_uom_symbol | Overloading |
| generic, public :: operator(/) => div | Overloading |
| generic, public :: operator(*) => mul | Overloading |
| generic, public :: operator(**) => pow_R8P, pow_R4P, pow_I8P, pow_I4P, pow_I2P, pow_I1P | Overloading |
| generic, public :: operator(==) => is_equal | Overloading |
| generic, public :: operator(.compatible.) => is_compatible | Definition of |
| generic, public :: operator(.convertible.) => is_convertible | Definition of |
| procedure, private, pass(self) :: is_compatible | Check if the symbol is compatible with another one. |
| procedure, private, pass(self) :: is_convertible | Check if the symbol is convertible with another one. |
| procedure, private, pass(self) :: is_equal | Check if the symbol is equal with another one. |
| procedure, private, pass(lhs) :: assign_uom_symbol |
|
| procedure, private, pass(lhs) :: div |
|
| procedure, private, pass(lhs) :: mul |
|
| procedure, private, pass(lhs) :: pow_R16P |
|
| procedure, private, pass(lhs) :: pow_R8P |
|
| procedure, private, pass(lhs) :: pow_R4P |
|
| procedure, private, pass(lhs) :: pow_I8P |
|
| procedure, private, pass(lhs) :: pow_I4P |
|
| procedure, private, pass(lhs) :: pow_I2P |
|
| procedure, private, pass(lhs) :: pow_I1P |
|
Convert a magnitude with respect symbol definition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| real(kind=RKP), | intent(in) | :: | magnitude | Magnitude to be converted. |
||
| logical, | intent(in), | optional | :: | inverse | Activate inverse conversion. |
Converted magnitude.
Return the symbol exponent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The symbol exponent.
Return the symbol factor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The symbol factor.
Return the symbol offset.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The symbol offset.
Return the literal symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The literal symbol.
Check if uom_symbol is defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
Check result.
Return a prefixed symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | prefix | Other symbol used for prefixing. |
The prefixed symbol.
Return a string representation of uom_symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| logical, | intent(in), | optional | :: | compact_reals | Flag to activate real numbers compacting. |
Raw characters data.
Check if uom_symbol is compatible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Check if uom_symbol is convertible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Check if uom_symbol is equal with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
uom_symbol / uom_symbol operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol * uom_symbol operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R16P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R16P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I2P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I2P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I1P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I1P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Return the symbol generic conversion alias.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| class(uom_converter), | intent(out), | allocatable | :: | convert_ | The symbol generic conversion alias. |
Parse symbol definition from string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | self | The uom symbol. |
||
| character(len=*), | intent(in) | :: | source | Source input string definition of symbol. |
Set symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | self | The uom symbol. |
||
| character(len=*), | intent(in), | optional | :: | symbol_ | literal symbol of the unit, e.g. "m" for metres. |
|
| integer(kind=IKP), | intent(in), | optional | :: | exponent_ | Exponent of the symbol, e.g. "-1" for Hertz, namely "s-1". |
|
| real(kind=RKP), | intent(in), | optional | :: | factor_ | Symbol multiplicative scale factor (used only for converters). |
|
| real(kind=RKP), | intent(in), | optional | :: | offset_ | Symbol additive offset (used only for converters). |
|
| class(uom_converter), | intent(in), | optional | :: | convert_ | Generic conversion alias formula user-supplied. |
Unset symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | self | The uom symbol. |
uom_symbol = uom_symbol assignment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |