FURY class definition of unit reference with float32 kind.
FURY class implementation of unit reference with generic kind.
Overloading uom_reference name with a creator function.
Create an instance of uom_reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | source | Source input string definition of the symbol. |
The uom reference.
Unit of measure reference class.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(uom_symbol), | private, | allocatable | :: | aliases(:) | Uom symbol aliases, e.g. "m = meter = metre" for metres. |
||
| integer(kind=I_P), | private | :: | aliases_number | = | 0_I_P | Number of defined symbol aliases. |
|
| type(uom_symbol), | private | :: | dimensions | Dimensions of the symbol, e.g. "length" for meter. |
Overloading uom_reference name with a creator function.
| private function creator_from_string(source) | Create an instance of uom_reference. |
| procedure, public, pass(self) :: dimensionality | Return a string representation of the symbol dimensions. |
| procedure, public, pass(self) :: get_aliases | Return the aliases list. |
| procedure, public, pass(self) :: get_dimensions | Return the dimensions. |
| procedure, public, pass(self) :: get_main_symbol | Return the main symbol, i.e. aliases(1). |
| procedure, public, pass(self) :: is_defined | Check if the reference is defined. |
| procedure, public, pass(self) :: parse | Parse reference from string. |
| procedure, public, pass(self) :: prefixed | Return a prefixed reference. |
| procedure, public, pass(self) :: set | Set reference. |
| procedure, public, pass(self) :: set_alias_conversion | Set alias conversion formula. |
| procedure, public, pass(self) :: stringify | Return a string representation of the reference. |
| procedure, public, pass(self) :: to | Convert magnitude with respect another alias. |
| procedure, public, pass(self) :: unset | Unset reference. |
| generic, public :: assignment(=) => assign_uom_reference | 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 |
| procedure, private, pass(self) :: is_compatible | Check if the reference is compatible with another one. |
| procedure, private, pass(self) :: is_equal | Check if the reference is equal with another one. |
| procedure, private, pass(lhs) :: assign_uom_reference |
|
| 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 |
|
Create an instance of uom_reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | source | Source input string definition of the symbol. |
The uom reference.
Return a string representation of uom_reference dimensions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
Raw characters data.
Return the main symbol, i.e. aliases(1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
First compatible alias.
Check if uom_reference is defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
Check result.
Return a prefixed reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| type(uom_reference), | intent(in) | :: | prefixes | Other reference used for prefixing. |
The prefixed reference.
Return a string representation of uom_reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| logical, | intent(in), | optional | :: | with_dimensions | Flag to activate dimensions printing. |
|
| logical, | intent(in), | optional | :: | with_aliases | Flag to activate aliases printing. |
|
| logical, | intent(in), | optional | :: | protect_aliases | Flag to activate aliases printing in protected mode. |
|
| logical, | intent(in), | optional | :: | compact_reals | Flag to activate real numbers compacting. |
Raw characters data.
Check if uom_reference is compatible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| type(uom_reference), | intent(in) | :: | other | The other reference. |
Check result.
Check if uom_reference is equal with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| type(uom_reference), | intent(in) | :: | other | The other reference. |
Check result.
uom_reference / uom_reference operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_reference), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference * uom_reference operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_reference), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** real(R16P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R16P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** real(R8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** real(R4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** integer(I8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** integer(I4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** integer(I2P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I2P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_reference ** integer(I1P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I1P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Return the aliases list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| type(uom_symbol), | intent(out), | allocatable | :: | aliases(:) | Aliases. |
Return the dimensions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| type(uom_symbol), | intent(out) | :: | dimensions | Dimensions. |
Parse uom_reference definition from string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(inout) | :: | self | The uom reference. |
||
| character(len=*), | intent(in) | :: | source | Source input string definition of symbol. |
Set reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(inout) | :: | self | The uom reference. |
||
| type(uom_symbol), | intent(in), | optional | :: | aliases(1:) | Reference aliases. |
|
| type(uom_symbol), | intent(in), | optional | :: | dimensions | Dimensions of the reference, e.g. "frequency" for Hz. |
Set alias conversion formula.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(inout) | :: | self | The uom reference. |
||
| integer(kind=I_P), | intent(in) | :: | alias_index | Index of the alias to which set the conversion formula. |
||
| class(uom_converter), | intent(in) | :: | convert | Generic conversion alias formula user-supplied. |
Convert magnitude with respect another alias.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(in) | :: | self | The uom reference. |
||
| type(uom_reference), | intent(in) | :: | other | Other unit reference used for conversion. |
||
| real(kind=RKP), | intent(in) | :: | magnitude | Magnitude to be converted. |
||
| real(kind=RKP), | intent(out) | :: | converted | Converted magnitude. |
||
| logical, | intent(out) | :: | is_found | Flag to check if a conversion alias has been found. |
Unset reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(inout) | :: | self | The uom reference. |
uom_reference = uom_reference assignment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_reference), | intent(inout) | :: | lhs | Left hand side. |
||
| type(uom_reference), | intent(in) | :: | rhs | Right hand side. |