dm_format Module

Serialisation format definitions.


Used by

  • module~~dm_format~~UsedByGraph module~dm_format dm_format module~dmpack dmpack module~dmpack->module~dm_format

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: FORMAT_NONE = 0

Invalid format.

integer, public, parameter :: FORMAT_BLOCK = 1

ASCII block.

integer, public, parameter :: FORMAT_CSV = 2

CSV.

integer, public, parameter :: FORMAT_GEOJSON = 3

GeoJSON.

integer, public, parameter :: FORMAT_JSON = 4

JSON.

integer, public, parameter :: FORMAT_JSONL = 5

JSON Lines, NDJSON.

integer, public, parameter :: FORMAT_NML = 6

Fortran 95 Namelist.

integer, public, parameter :: FORMAT_LAST = 6

Never use this.

integer, public, parameter :: FORMAT_NAME_LEN = 7

Max. length of format name.

character(len=*), public, parameter :: FORMAT_NAMES(FORMAT_NONE:FORMAT_LAST) = [character(len=FORMAT_NAME_LEN)::'none', 'block', 'csv', 'geojson', 'json', 'jsonl', 'nml']

Format names array.


Functions

public pure elemental function dm_format_from_name(name) result(format)

Returns format enumerator from given name. If the argument is not a valid format, the function returns FORMAT_NONE.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Format name.

Return Value integer

public pure elemental function dm_format_is_valid(format) result(valid)

Returns .true. if given format is valid. FORMAT_NONE is an invalid format.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: format

Format enumerator.

Return Value logical