Documentation for module input_enumeration_types

represents an enumeration, i.e. a mapping between integers and strings

source: input_enumeration_types.F
Loading...

public Types:

enumeration_type
...

public Subroutines/Functions:

FUNCTION
INTEGER
enum_c2i (enum, c)
maps a string to an integer
creates an enumeration
FUNCTION
enum_i2c (enum, i)
maps an integer to a string
SUBROUTINE
enum_release (enum)
releases the given enumeration
SUBROUTINE
enum_retain (enum)
retains the given enumeration

public Types:

TYPE :: enumeration_type

...


INTEGER
:: id_nr ...
INTEGER
:: ref_count ...
DIMENSION(:), POINTER :: c_vals ...
TYPE(char_array),
DIMENSION(:), POINTER :: desc => NULL() ...
INTEGER,
DIMENSION(:), POINTER :: i_vals ...
LOGICAL
:: strict ...

FUNCTIONenum_c2i(enum, c)

maps a string to an integer

Return Value ::
INTEGER
Arguments:
POINTER
:: enum the enumeration to use for the mapping
CHARACTER(*),
INTENT(in)
:: c the value to map

SUBROUTINEenum_create(enum, c_vals, i_vals, desc, strict)

creates an enumeration

Arguments:
POINTER
:: enum the enumeration to be created
CHARACTER(*),
INTENT(in)
:: c_vals(:) string values
INTEGER,
INTENT(in)
:: i_vals(:) integer values
CHARACTER(*),
INTENT(in),
OPTIONAL
:: desc(:) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: strict if integer values not in the list should be accepted, defaults defaults to true

FUNCTIONenum_i2c(enum, i)

maps an integer to a string

Return Value ::
Arguments:
POINTER
:: enum the enumeration to use for the mapping
INTEGER,
INTENT(in)
:: i the value to map

SUBROUTINEenum_release(enum)

releases the given enumeration

Arguments:
POINTER
:: enum the obect to release

SUBROUTINEenum_retain(enum)

retains the given enumeration

Arguments:
POINTER
:: enum the obect to retain

private Parameters/Types:

private Types:

TYPE :: char_array

represents an enumaration, i.e. a mapping between strings and numbers


CHARACTER,
DIMENSION(:), POINTER :: chars => NULL() ...