SimpleSocket Derived Type

type, public, extends(AbstractSocket) :: SimpleSocket


Inherits

type~~simplesocket~~InheritsGraph type~simplesocket SimpleSocket type~abstractmessage AbstractMessage type~simplesocket->type~abstractmessage msg type~abstractsocket AbstractSocket type~simplesocket->type~abstractsocket type~basethread BaseThread type~simplesocket->type~basethread visitor type~basethread->type~abstractsocket connection type~integerrequestmap IntegerRequestMap type~basethread->type~integerrequestmap open_requests type~messagevisitor MessageVisitor type~basethread->type~messagevisitor type~map_set~13 map_Set type~integerrequestmap->type~map_set~13 tree type~surrogatemessagevisitor SurrogateMessageVisitor type~messagevisitor->type~surrogatemessagevisitor type~map_s_basenode~13 map_s_BaseNode type~map_set~13->type~map_s_basenode~13 root

Components

Type Visibility Attributes Name Initial
class(AbstractMessage), public, allocatable :: msg
class(BaseThread), public, pointer :: visitor

Constructor

public interface SimpleSocket

  • private function new_SimpleSocket_visitor(visitor) result(socket)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(in), target :: visitor

    Return Value type(SimpleSocket), target

  • private function new_SimpleSocket() result(socket)

    Arguments

    None

    Return Value type(SimpleSocket), target


Type-Bound Procedures

procedure, public :: get

  • private function get(this, request_id, local_reference, rc) result(handle)

    Arguments

    Type IntentOptional Attributes Name
    class(SimpleSocket), intent(inout), target :: this
    integer, intent(in) :: request_id
    class(AbstractDataReference), intent(in) :: local_reference
    integer, intent(out), optional :: rc

    Return Value class(AbstractRequestHandle), allocatable

procedure, public :: put

  • private function put(this, request_id, local_reference, rc) result(handle)

    Arguments

    Type IntentOptional Attributes Name
    class(SimpleSocket), intent(inout) :: this
    integer, intent(in) :: request_id
    class(AbstractDataReference), intent(in) :: local_reference
    integer, intent(out), optional :: rc

    Return Value class(AbstractRequestHandle), allocatable

procedure, public :: receive

  • private subroutine receive(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(SimpleSocket), intent(inout) :: this
    class(AbstractMessage), intent(out), allocatable :: message
    integer, intent(out), optional :: rc

procedure, public :: send

  • private recursive subroutine send(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(SimpleSocket), intent(inout), target :: this
    class(AbstractMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: set_visitor

  • private subroutine set_visitor(this, visitor)

    Arguments

    Type IntentOptional Attributes Name
    class(SimpleSocket), intent(inout) :: this
    class(BaseThread), intent(in), target :: visitor

procedure, public :: to_string

  • private function to_string(this) result(string)

    Arguments

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

    Return Value character(len=:), allocatable

Source Code

   type, extends (AbstractSocket) :: SimpleSocket
      class(AbstractMessage),allocatable :: msg
      !private
      class (BaseThread), pointer :: visitor
   contains
      procedure :: receive
      procedure :: send
      procedure :: put
      procedure :: get
      procedure :: to_string
      procedure :: set_visitor
   end type SimpleSocket