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 25 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 561 of file conversions.F90.
562 integer,
target ,
intent(in) :: input
563 logical,
intent(in) :: makecopy
564 class(*),
pointer :: integer_to_generic
567 allocate(integer_to_generic, source=input)
569 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 609 of file conversions.F90.
610 logical,
target,
intent(in) :: input
611 logical,
intent(in) :: makecopy
612 class(*),
pointer :: logical_to_generic
615 allocate(logical_to_generic, source=input)
617 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 593 of file conversions.F90.
594 real(kind=double_precision),
target,
intent(in) :: input
595 logical,
intent(in) :: makecopy
596 class(*),
pointer :: real_double_to_generic
599 allocate(real_double_to_generic, source=input)
601 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 577 of file conversions.F90.
578 real(kind=single_precision),
target,
intent(in) :: input
579 logical,
intent(in) :: makecopy
580 class(*),
pointer :: real_single_to_generic
583 allocate(real_single_to_generic, source=input)
585 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 545 of file conversions.F90.
546 character(len=*),
target,
intent(in) :: string
547 logical,
intent(in) :: makecopy
548 class(*),
pointer :: string_to_generic
551 allocate(string_to_generic, source=string)
553 string_to_generic=>string
The documentation for this interface was generated from the following file: