bindings

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: BSL-1.0 Imports: 0 Imported by: 0

README

Bindings

GoDoc Go Report Card

About

This package provides bindings for values, similar to Java's property bindings. It is published on https://github.com/vbsw/bindings.

Copyright 2019, Vitali Baumtrok (vbsw@mailbox.org).

Bindings is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

Bindings is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.

Using Go

Get this project:

$ go get github.com/vbsw/bindings

Update a local copy:

$ go get -u github.com/vbsw/bindings

Compile:

$ go install github.com/vbsw/bindings

Run tests:

$ go test github.com/vbsw/bindings

Using Git

Get the master branch and all refs of this project:

$ git clone https://github.com/vbsw/bindings.git

See all tags:

$ git tag -l

See local and remote branches:

$ git branch -a

Checkout other branches than master, for example the development branch:

$ git branch development origin/development
$ git checkout development

See tracked remote branches:

$ git branch -vv

Update all tracked branches and all refs:

$ git fetch

References

Documentation

Overview

Package bindings provides bindings for values.

Version 0.2.0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean interface {
	AddListener(BooleanListener)
	And(Boolean) Boolean
	EqualTo(Boolean) Boolean
	Not() Boolean
	NotEqualTo(Boolean) Boolean
	Or(Boolean) Boolean
	RemoveListener(BooleanListener)
	Set(bool)
	Value() bool
}

Boolean is an observable value.

func NewBoolean

func NewBoolean() Boolean

NewBoolean creates the observable Boolean and returns it.

type BooleanListener

type BooleanListener interface {
	BooleanChanged(Boolean, bool, bool)
}

BooleanListener is a listener for the observable Boolean. Function BooleanChanged is called only when observable value has changed, i.e. new value is not equal to old value.

type Float64 added in v0.2.0

type Float64 interface {
	AddListener(Float64Listener)
	Divide(Float64) Float64
	EqualTo(Float64) Boolean
	GreaterThan(Float64) Boolean
	GreaterThanOrEqualTo(Float64) Boolean
	LessThan(Float64) Boolean
	LessThanOrEqualTo(Float64) Boolean
	Minus(Float64) Float64
	Multiply(Float64) Float64
	NotEqualTo(Float64) Boolean
	Plus(Float64) Float64
	RemoveListener(Float64Listener)
	Set(float64)
	Value() float64
}

Float64 is an observable value.

type Float64Listener added in v0.2.0

type Float64Listener interface {
	Float64Changed(Float64, float64, float64)
}

Float64Listener is a listener for the observable Float64. Function Float64Changed is called only when observable value has changed, i.e. new value is not equal to old value.

Jump to

Keyboard shortcuts

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