fson_string_m Module


Contents


Variables

TypeVisibility AttributesNameInitial
integer, private, parameter:: BLOCK_SIZE =32

Interfaces

public interface fson_string_append

  • private subroutine append_chars(str, c)

    Arguments

    Type IntentOptional AttributesName
    type(fson_string), pointer:: str
    character(len=*), intent(in) :: c
  • private subroutine append_string(str1, str2)

    Arguments

    Type IntentOptional AttributesName
    type(fson_string), pointer:: str1
    type(fson_string), pointer:: str2

public interface fson_string_copy

  • private subroutine copy_chars(this, to)

    Arguments

    Type IntentOptional AttributesName
    type(fson_string), pointer:: this
    character(len=*), intent(inout) :: to

public interface fson_string_equals

  • private function equals_string(this, other) result(equals)

    Arguments

    Type IntentOptional AttributesName
    type(fson_string), pointer:: this
    type(fson_string), pointer:: other

    Return Value logical

public interface fson_string_length

  • private recursive function string_length(str) result(count)

    Arguments

    Type IntentOptional AttributesName
    type(fson_string), pointer:: str

    Return Value integer


Derived Types

type, public :: fson_string

Components

TypeVisibility AttributesNameInitial
character(len=BLOCK_SIZE), public :: chars
integer, public :: index =0
type(fson_string), public, pointer:: next=> null()

Functions

public function fson_string_create(chars) result(new)

Arguments

Type IntentOptional AttributesName
character(len=*), optional :: chars

Return Value type(fson_string), pointer

private recursive function string_length(str) result(count)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: str

Return Value integer

private recursive function get_char_at(this, i) result(c)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this
integer, intent(in) :: i

Return Value character

private function equals_string(this, other) result(equals)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this
type(fson_string), pointer:: other

Return Value logical


Subroutines

public recursive subroutine fson_string_destroy(this)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this

private subroutine allocate_block(this)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this

private subroutine append_string(str1, str2)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: str1
type(fson_string), pointer:: str2

private subroutine append_chars(str, c)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: str
character(len=*), intent(in) :: c

private recursive subroutine append_char(str, c)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: str
character, intent(in) :: c

private subroutine copy_chars(this, to)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this
character(len=*), intent(inout) :: to

private recursive subroutine string_clear(this)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this