visitor

package
v0.0.0-...-eb200bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageA

type MessageA struct {
	Msg    string
	Output io.Writer
}

func (*MessageA) Accept

func (m *MessageA) Accept(v Visitor)

func (*MessageA) Print

func (m *MessageA) Print()

type MessageB

type MessageB struct {
	Msg    string
	Output io.Writer
}

func (*MessageB) Accept

func (m *MessageB) Accept(v Visitor)

func (*MessageB) Print

func (m *MessageB) Print()

type MessageVisitor

type MessageVisitor struct{}

func (*MessageVisitor) VisitA

func (mf *MessageVisitor) VisitA(m *MessageA)

func (*MessageVisitor) VisitB

func (mf *MessageVisitor) VisitB(m *MessageB)

type MsgFieldVisitorPrinter

type MsgFieldVisitorPrinter struct{}

func (*MsgFieldVisitorPrinter) VisitA

func (mf *MsgFieldVisitorPrinter) VisitA(m *MessageA)

func (*MsgFieldVisitorPrinter) VisitB

func (mf *MsgFieldVisitorPrinter) VisitB(m *MessageB)

type Visitable

type Visitable interface {
	Accept(Visitor)
}

type Visitor

type Visitor interface {
	VisitA(*MessageA)
	VisitB(*MessageB)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL