UnlimitedEntity Derived Type

type, public :: UnlimitedEntity


Inherited by

type~~unlimitedentity~~InheritedByGraph type~unlimitedentity UnlimitedEntity type~attribute Attribute type~attribute->type~unlimitedentity type~pair~7 pair type~pair~7->type~unlimitedentity value type~variable Variable type~variable->type~unlimitedentity const_value type~coordinatevariable CoordinateVariable type~coordinatevariable->type~variable type~filemetadata FileMetadata type~filemetadata->type~variable global_var type~pair~10 pair type~pair~10->type~attribute value type~pair~12 pair type~pair~12->type~variable value type~tvector~7 tVector type~tvector~7->type~pair~7 elements type~addhistcollectionmessage AddHistCollectionMessage type~addhistcollectionmessage->type~filemetadata fmd type~cfiocollection CFIOCollection type~cfiocollection->type~filemetadata file type~extdatafilestream ExtDataFileStream type~extdatafilestream->type~filemetadata metadata type~filemetadatautils FileMetadataUtils type~filemetadatautils->type~filemetadata type~filemetadatavector FileMetadataVector type~filemetadatavector->type~filemetadata elements type~filemetadatavectoriterator FileMetadataVectorIterator type~filemetadatavectoriterator->type~filemetadata elements type~filemetadatavectorriterator FileMetadataVectorRIterator type~filemetadatavectorriterator->type~filemetadata elements type~historycollection HistoryCollection type~historycollection->type~filemetadata fmd type~mapl_griddedio MAPL_GriddedIO type~mapl_griddedio->type~filemetadata metadata type~masksamplergeosat MaskSamplerGeosat type~masksamplergeosat->type~filemetadata metadata type~obs_unit obs_unit type~obs_unit->type~filemetadata metadata type~pfio_vector PFIO_Vector type~pfio_vector->type~filemetadata elements type~pfio_vectoriterator PFIO_VectorIterator type~pfio_vectoriterator->type~filemetadata elements type~pfio_vectorriterator PFIO_VectorRIterator type~pfio_vectorriterator->type~filemetadata elements type~regridsupport RegridSupport type~regridsupport->type~filemetadata cfio_cubed_sphere, cfio_lat_lon type~replacemetadatamessage ReplaceMetadataMessage type~replacemetadatamessage->type~filemetadata fmd type~sampler sampler type~sampler->type~filemetadata metadata type~set2~8 set2 type~set2~8->type~tvector~7 items type~stationsampler StationSampler type~stationsampler->type~filemetadata metadata type~tvector~10 tVector type~tvector~10->type~pair~10 elements type~tvector~12 tVector type~tvector~12->type~pair~12 elements

Constructor

public interface UnlimitedEntity

  • private function new_UnlimitedEntity_empty() result(attr)

    Arguments

    None

    Return Value type(UnlimitedEntity)

  • private function new_UnlimitedEntity_0d(value, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: value
    integer, intent(out), optional :: rc

    Return Value type(UnlimitedEntity)

  • private function new_UnlimitedEntity_1d(values, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: values(:)
    integer, intent(out), optional :: rc

    Return Value type(UnlimitedEntity)

  • private function new_UnlimitedEntity_2d(values, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: values(:,:)
    integer, intent(out), optional :: rc

    Return Value type(UnlimitedEntity)

  • private function new_UnlimitedEntity_3d(values, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: values(:,:,:)
    integer, intent(out), optional :: rc

    Return Value type(UnlimitedEntity)

  • private function new_UnlimitedEntity_4d(values, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: values(:,:,:,:)
    integer, intent(out), optional :: rc

    Return Value type(UnlimitedEntity)

  • private function new_UnlimitedEntity_5d(values, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: values(:,:,:,:,:)
    integer, intent(out), optional :: rc

    Return Value type(UnlimitedEntity)


Type-Bound Procedures

procedure, public :: destroy

  • private subroutine destroy(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: equal

  • private function equal(a, b)

    equals() - returns true if-and-only-if a and b are the same type, kind, shape, and have the same values.

    Only intrinsic data types are supported.

    Ugly nested SELECT TYPE is unfortunately necessary.

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: a
    type(UnlimitedEntity), intent(in), target :: b

    Return Value logical

procedure, public :: get_rank

  • private function get_rank(this, rc) result(rank)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: this
    integer, intent(out), optional :: rc

    Return Value integer

procedure, public :: get_shape

  • private function get_shape(this, rc) result(shp)

    Simple accessor

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: this
    integer, intent(out), optional :: rc

    Return Value integer, allocatable, (:)

procedure, public :: get_string

  • private function get_string(this, rc) result(string)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value character(len=:), allocatable

procedure, public :: get_value

  • private function get_value(this, rc) result(value)

    get string or scalar

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value class(*), pointer

procedure, public :: get_values

  • private function get_values(this, rc) result(values)

    get 1d , need get_shape to get back to original array

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value class(*), pointer, (:)

procedure, public :: is_empty

  • private function is_empty(this, rc) result(yes)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value logical

procedure, public :: not_equal

  • private function not_equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: a
    type(UnlimitedEntity), intent(in) :: b

    Return Value logical

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

  • private function not_equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: a
    type(UnlimitedEntity), intent(in) :: b

    Return Value logical

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

  • private function equal(a, b)

    equals() - returns true if-and-only-if a and b are the same type, kind, shape, and have the same values.

    Only intrinsic data types are supported.

    Ugly nested SELECT TYPE is unfortunately necessary.

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: a
    type(UnlimitedEntity), intent(in), target :: b

    Return Value logical

procedure, public :: serialize

  • private subroutine serialize(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(inout), allocatable :: buffer(:)
    integer, intent(out), optional :: rc

procedure, public :: set

  • private subroutine set(this, value, rc)

    Set string or scalar

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(inout) :: this
    class(*), intent(in) :: value
    integer, intent(out), optional :: rc

Source Code

   type :: UnlimitedEntity
      private
      integer, allocatable :: shape(:)
      class (*), allocatable :: value
      class (*), allocatable :: values(:)
      logical :: valid = .false. !! just to avoid warning for empty constructor
   contains
      procedure :: get_shape
      procedure :: get_rank
      procedure :: get_value
      procedure :: get_values
      generic :: operator(==) => equal
      generic :: operator(/=) => not_equal
      procedure :: equal
      procedure :: not_equal
      procedure :: set
      procedure :: serialize
      procedure :: get_string
      procedure :: is_empty
      procedure :: destroy
   end type UnlimitedEntity