Converts a data type into the generic (class *) form.
More...
|
class(*) function, pointer | string_to_generic (string, makecopy) |
| Converts a string into its generic data representation. More...
|
|
class(*) function, pointer | integer_to_generic (input, makecopy) |
| Converts an integer into its generic data representation. More...
|
|
class(*) function, pointer | real_single_to_generic (input, makecopy) |
| Converts a single real into its generic data representation. More...
|
|
class(*) function, pointer | real_double_to_generic (input, makecopy) |
| Converts a double real into its generic data representation. More...
|
|
class(*) function, pointer | logical_to_generic (input, makecopy) |
| Converts a logical into its generic data representation. More...
|
|
Converts a data type into the generic (class *) form.
Will convert structured data into its generic form and return a pointer to this. The caller should also specify whether to make a copy of the data or not
- Parameters
-
data | The structured data to convert into generic |
copyflag | Whether to use a copy of the structured data or not |
- Returns
- A pointer to the generic representation of the data
Definition at line 23 of file conversions.F90.
◆ integer_to_generic()
class(*) function, pointer conversions_mod::conv_to_generic::integer_to_generic |
( |
integer, intent(in), target |
input, |
|
|
logical, intent(in) |
makecopy |
|
) |
| |
|
private |
Converts an integer into its generic data representation.
- Parameters
-
input | The integer to convert into its generic representation |
makecopy | Whether make a copy of the underlying data or just return a simple pointer |
- Returns
- A pointer to the generic data
Definition at line 550 of file conversions.F90.
550 integer,
target ,
intent(in) :: input
551 logical,
intent(in) :: makecopy
552 class(*),
pointer :: integer_to_generic
555 allocate(integer_to_generic, source=input)
557 integer_to_generic=>input
◆ logical_to_generic()
class(*) function, pointer conversions_mod::conv_to_generic::logical_to_generic |
( |
logical, intent(in), target |
input, |
|
|
logical, intent(in) |
makecopy |
|
) |
| |
|
private |
Converts a logical into its generic data representation.
- Parameters
-
input | The logical to convert into its generic representation |
makecopy | Whether make a copy of the underlying data or just return a simple pointer |
- Returns
- A pointer to the generic data
Definition at line 598 of file conversions.F90.
598 logical,
target,
intent(in) :: input
599 logical,
intent(in) :: makecopy
600 class(*),
pointer :: logical_to_generic
603 allocate(logical_to_generic, source=input)
605 logical_to_generic=>input
◆ real_double_to_generic()
class(*) function, pointer conversions_mod::conv_to_generic::real_double_to_generic |
( |
real(kind=double_precision), intent(in), target |
input, |
|
|
logical, intent(in) |
makecopy |
|
) |
| |
|
private |
Converts a double real into its generic data representation.
- Parameters
-
input | The real to convert into its generic representation |
makecopy | Whether make a copy of the underlying data or just return a simple pointer |
- Returns
- A pointer to the generic data
Definition at line 582 of file conversions.F90.
582 real(kind=DOUBLE_PRECISION),
target,
intent(in) :: input
583 logical,
intent(in) :: makecopy
584 class(*),
pointer :: real_double_to_generic
587 allocate(real_double_to_generic, source=input)
589 real_double_to_generic=>input
◆ real_single_to_generic()
class(*) function, pointer conversions_mod::conv_to_generic::real_single_to_generic |
( |
real(kind=single_precision), intent(in), target |
input, |
|
|
logical, intent(in) |
makecopy |
|
) |
| |
|
private |
Converts a single real into its generic data representation.
- Parameters
-
input | The real to convert into its generic representation |
makecopy | Whether make a copy of the underlying data or just return a simple pointer |
- Returns
- A pointer to the generic data
Definition at line 566 of file conversions.F90.
566 real(kind=SINGLE_PRECISION),
target,
intent(in) :: input
567 logical,
intent(in) :: makecopy
568 class(*),
pointer :: real_single_to_generic
571 allocate(real_single_to_generic, source=input)
573 real_single_to_generic=>input
◆ string_to_generic()
class(*) function, pointer conversions_mod::conv_to_generic::string_to_generic |
( |
character(len=*), intent(in), target |
string, |
|
|
logical, intent(in) |
makecopy |
|
) |
| |
|
private |
Converts a string into its generic data representation.
- Parameters
-
string | The string to convert into its generic representation |
makecopy | Whether make a copy of the underlying data or just return a simple pointer |
- Returns
- A pointer to the generic data
Definition at line 534 of file conversions.F90.
534 character(len=*),
target,
intent(in) :: string
535 logical,
intent(in) :: makecopy
536 class(*),
pointer :: string_to_generic
539 allocate(string_to_generic, source=string)
541 string_to_generic=>string
The documentation for this interface was generated from the following file:
- /nfs/a277/earlcd/dev/monc/svn-git/monc/model_core/src/utils/conversions.F90