trees

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTask

type BaseTask[E any] struct {
	// contains filtered or unexported fields
}

func (*BaseTask[E]) Status

func (t *BaseTask[E]) Status() TaskStatus

type Task

type Task[E any] interface {
	Status() TaskStatus

	Control() bt.Optional[Task[E]]
	SetControl(c bt.Optional[Task[E]])

	Guard() bt.Optional[Task[E]]
	SetGuard(g bt.Optional[Task[E]])

	AddChild(child Task[E]) int
	NumChildren() int
	GetChild(idx int) Task[E]

	Object() E

	CheckGuard(control Task[E]) bool

	Start()
	End()
	Run()
	Running()
	Success()
	Fail()

	ChildRunning(task, reporter Task[E])
	ChildSuccess(task Task[E])
	ChildFail(task Task[E])

	Cancel()
	CancelRunningChildren(startIdx int)
}

type TaskStatus

type TaskStatus int8
const (
	TaskFresh TaskStatus = iota
	TaskRunning
	TaskFailed
	TaskSucceeded
	TaskCancelled
)

Jump to

Keyboard shortcuts

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