MemoryTextColumn Derived Type

type, public, extends(TextColumn) :: MemoryTextColumn

$ character(:), allocatable :: header(:)


Inherits

type~~memorytextcolumn~~InheritsGraph type~memorytextcolumn MemoryTextColumn type~abstractcolumn AbstractColumn type~memorytextcolumn->type~abstractcolumn data_column type~string~2 String type~memorytextcolumn->type~string~2 header type~textcolumn TextColumn type~memorytextcolumn->type~textcolumn

Constructor

public interface MemoryTextColumn

  • private function new_MemoryTextColumn(header, format, width, data_column, separator) result(column)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: header(:)
    character(len=*), intent(in) :: format
    integer, intent(in) :: width
    class(AbstractColumn), intent(in) :: data_column
    character(len=1), intent(in), optional :: separator

    Return Value type(MemoryTextColumn)


Type-Bound Procedures

procedure, public :: center

  • private subroutine center(this, rows, space)

    Arguments

    Type IntentOptional Attributes Name
    class(TextColumn), intent(in) :: this
    character(len=*), intent(inout) :: rows(:)
    character(len=1), intent(in), optional :: space

procedure, public :: get_header

  • private subroutine get_header(this, header)

    Arguments

    Type IntentOptional Attributes Name
    class(MemoryTextColumn), intent(in) :: this
    character(len=:), intent(out), allocatable :: header(:)

procedure, public :: get_num_rows_header

  • private function get_num_rows_header(this) result(num_rows)

    Arguments

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

    Return Value integer

procedure, public :: get_num_rows_separator

  • private function get_num_rows_separator(this) result(num_rows)

    Arguments

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

    Return Value integer

procedure, public :: get_rows

  • private subroutine get_rows(this, node, rows)

    Arguments

    Type IntentOptional Attributes Name
    class(MemoryTextColumn), intent(in) :: this
    class(AbstractMeterNode), intent(in), target :: node
    character(len=:), intent(out), allocatable :: rows(:)

procedure, public :: get_separator

  • private subroutine get_separator(this, separator, k)

    Arguments

    Type IntentOptional Attributes Name
    class(TextColumn), intent(in) :: this
    character(len=*), intent(inout) :: separator(k)
    integer, intent(in) :: k

procedure, public :: get_width

  • private function get_width(this) result(column_width)

    Arguments

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

    Return Value integer

procedure, public :: set_separator

  • private subroutine set_separator(this, separator)

    Arguments

    Type IntentOptional Attributes Name
    class(TextColumn), intent(inout) :: this
    character(len=1), intent(in) :: separator

procedure, public :: set_width

  • private subroutine set_width(this, column_width)

    Arguments

    Type IntentOptional Attributes Name
    class(TextColumn), intent(inout) :: this
    integer, intent(in) :: column_width

Source Code

   type, extends(TextColumn) :: MemoryTextColumn
      private
!!$      character(:), allocatable :: header(:)
      type (String), allocatable :: header(:)
      character(:), allocatable :: format
      class (AbstractColumn), allocatable :: data_column
   contains
      procedure :: get_header
      procedure :: get_num_rows_header
      procedure :: get_rows
   end type MemoryTextColumn