command

package
v0.0.0-...-c864ae1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: BSD-2-Clause, BSD-3-Clause, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCommand

type BaseCommand struct {
	attributes.ContainedAttributes
	// contains filtered or unexported fields
}

func (*BaseCommand) Do

func (c *BaseCommand) Do() CommandStatus

func (*BaseCommand) Reset

func (c *BaseCommand) Reset()

func (*BaseCommand) Target

func (c *BaseCommand) Target() interface{}

func (*BaseCommand) Undo

func (c *BaseCommand) Undo() CommandStatus

func (*BaseCommand) WithTarget

func (c *BaseCommand) WithTarget(target interface{}) *BaseCommand

type Command

type Command interface {
	Do() CommandStatus
	Undo() CommandStatus
	Reset()
}

type CommandStatus

type CommandStatus int
const Done CommandStatus = 1
const NoChange CommandStatus = 2
const UnDone CommandStatus = 0

type CompositeCommand

type CompositeCommand struct {
	// contains filtered or unexported fields
}

func NewCompositeCommand

func NewCompositeCommand() *CompositeCommand

func (*CompositeCommand) Add

func (c *CompositeCommand) Add(commands ...Command)

func (*CompositeCommand) ComposedOf

func (c *CompositeCommand) ComposedOf(commands ...Command) *CompositeCommand

func (*CompositeCommand) Do

func (c *CompositeCommand) Do()

func (*CompositeCommand) Undo

func (c *CompositeCommand) Undo()

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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