view

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package view allows to get a View of entity.Entity objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator added in v0.1.9

type Iterator interface {
	// Next returns next element
	Next() Iterator
	// Value returns the current item value
	Value() *entity.Entity
}

Iterator for view

type View

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

View represent a set of entity.Entity objects

func New

func New() *View

New creates a new empty View

func (*View) Add

func (vw *View) Add(ent *entity.Entity) *entity.Entity

Add a entity.Entity instance to a View

func (*View) Clear added in v0.1.10

func (vw *View) Clear()

Clear removes all entity.Entity from the view.View

func (*View) Iterator added in v0.1.9

func (vw *View) Iterator(rtypes ...reflect.Type) Iterator

Iterator return an view.Iterator for the given varg reflect.Type

func (*View) Remove

func (vw *View) Remove(ent *entity.Entity) error

Remove a entity.Entity from a View

func (View) Size

func (vw View) Size() int

Size of entity.Entity in the View

func (View) String

func (vw View) String() string

String get a string representation of a View

Jump to

Keyboard shortcuts

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