ByteSize_t Derived Type

type, public :: ByteSize_t

A class to represent information storage demand


Components

Type Visibility Attributes Name Initial
integer(kind=int64), public :: bytes

Type-Bound Procedures

procedure, public :: to_human_str => to_human_str_ByteSize_t

  • private pure function to_human_str_ByteSize_t(this, binary, after_comma) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    logical, intent(in), optional :: binary

    Use binary prefixes, i.e. GiB = 230 instead of decimal, i.e. GB = 109 By default false

    integer, intent(in), optional :: after_comma

    digits after the comma By default 2

    Return Value character(len=:), allocatable

procedure, private :: add_ByteSize_t

  • private elemental function add_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value type(ByteSize_t)

procedure, private :: sub_ByteSize_t

  • private elemental function sub_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value type(ByteSize_t)

procedure, private :: eq_ByteSize_t

  • private elemental function eq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

procedure, private :: neq_ByteSize_t

  • private elemental function neq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

procedure, private :: less_ByteSize_t

  • private elemental function less_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

procedure, private :: more_ByteSize_t

  • private elemental function more_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

procedure, private :: leq_ByteSize_t

  • private elemental function leq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

procedure, private :: geq_ByteSize_t

  • private elemental function geq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

generic, public :: operator(+) => add_ByteSize_t

  • private elemental function add_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value type(ByteSize_t)

generic, public :: operator(-) => sub_ByteSize_t

  • private elemental function sub_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value type(ByteSize_t)

generic, public :: operator(==) => eq_ByteSize_t

  • private elemental function eq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

generic, public :: operator(/=) => neq_ByteSize_t

  • private elemental function neq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

generic, public :: operator(<) => less_ByteSize_t

  • private elemental function less_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

generic, public :: operator(>) => more_ByteSize_t

  • private elemental function more_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

generic, public :: operator(<=) => leq_ByteSize_t

  • private elemental function leq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical

generic, public :: operator(>=) => geq_ByteSize_t

  • private elemental function geq_ByteSize_t(this, other) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(ByteSize_t), intent(in) :: this
    class(ByteSize_t), intent(in) :: other

    Return Value logical