view

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 3 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 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) Entities

func (vw View) Entities(rtypes ...reflect.Type) []*entity.Entity

Entities return slice of entity.Entity for the given varg reflect.Type

func (View) Entity

func (vw View) Entity(rtypes ...reflect.Type) *entity.Entity

Entity return the first entity.Entity for the given varg reflect.Type in the View, nil if they are none

func (*View) Remove

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

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

func (View) SubView

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

SubView generate a new View from the given varg reflect.Type

Jump to

Keyboard shortcuts

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