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~set2~9 set2 type~integerrequestmap->type~set2~9 tree type~surrogatemessagevisitor SurrogateMessageVisitor type~messagevisitor->type~surrogatemessagevisitor type~ivector~8 iVector type~set2~9->type~ivector~8 parents, lefts, rights, heights type~tvector~8 tVector type~set2~9->type~tvector~8 items

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 function receive(this, rc) result(message)

    Arguments

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

    Return Value class(AbstractMessage), pointer

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