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()
Click to show internal directories.
Click to hide internal directories.