accessors

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstraintAccessor

type ConstraintAccessor interface {
	GetConstraint(id uint) (*constraint.Constraint, bool)
	ConstraintsForElement(eId uint) []*constraint.Constraint
	SetConstraintElement(oldId uint, newElement uint)
	AddConstraint(*constraint.Constraint) *constraint.Constraint
	RemoveConstraint(uint)
	ReplaceElement(uint, uint)
	Count() int
	NextId() uint
	IdSet() *utils.Set
	LogConstraints(level zerolog.Level)
	IsMet(constraint uint, cluster int, ea ElementAccessor) bool
}

type ConstraintRepository

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

func NewConstraintRepository

func NewConstraintRepository() *ConstraintRepository

func (*ConstraintRepository) AddConstraint

func (*ConstraintRepository) Clear

func (r *ConstraintRepository) Clear()

func (*ConstraintRepository) ConstraintsForElement

func (r *ConstraintRepository) ConstraintsForElement(eId uint) []*constraint.Constraint

func (*ConstraintRepository) Count

func (r *ConstraintRepository) Count() int

func (*ConstraintRepository) GetConstraint

func (r *ConstraintRepository) GetConstraint(cId uint) (*constraint.Constraint, bool)

func (*ConstraintRepository) IdSet

func (r *ConstraintRepository) IdSet() *utils.Set

func (*ConstraintRepository) IsMet

func (r *ConstraintRepository) IsMet(constr uint, cluster int, ea ElementAccessor) bool

func (*ConstraintRepository) LogConstraints

func (r *ConstraintRepository) LogConstraints(level zerolog.Level)

func (*ConstraintRepository) NextId

func (r *ConstraintRepository) NextId() uint

func (*ConstraintRepository) RemoveConstraint

func (r *ConstraintRepository) RemoveConstraint(cId uint)

func (*ConstraintRepository) ReplaceElement added in v0.1.3

func (r *ConstraintRepository) ReplaceElement(original, new uint)

func (*ConstraintRepository) SetConstraintElement

func (r *ConstraintRepository) SetConstraintElement(oldId uint, newElement uint)

type ElementAccessor

type ElementAccessor interface {
	GetElement(cId int, eId uint) (el.SketchElement, bool)
	IsFixed(eId uint) bool
	Cluster(eId uint) (uint, bool)
	IsShared(eId uint) bool
	AddElement(el.SketchElement) el.SketchElement
	AddElementToCluster(uint, int)
	SetConstraintLevel(uint, el.ConstraintLevel)
	ConstraintLevel(uint) el.ConstraintLevel
	ReplaceElement(int, uint, el.SketchElement)
	RemoveElement(uint)
	SharedElements(int, int) *utils.Set
	MergeElements(int, int)
	MergeToRoot(int)
	CopyToCluster(int, int, uint)
	NextId() uint
	IdSet() *utils.Set
	Count() int
	Clear()
	ClearClusters()
	LogElements(zerolog.Level)
}

type ElementRepository

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

func NewElementRepository

func NewElementRepository() *ElementRepository

func (*ElementRepository) AddElement

func (*ElementRepository) AddElementToCluster

func (r *ElementRepository) AddElementToCluster(eId uint, cId int)

func (*ElementRepository) Clear

func (r *ElementRepository) Clear()

func (*ElementRepository) ClearClusters

func (r *ElementRepository) ClearClusters()

func (*ElementRepository) Cluster added in v0.2.0

func (r *ElementRepository) Cluster(eId uint) (uint, bool)

func (*ElementRepository) ConstraintLevel

func (r *ElementRepository) ConstraintLevel(eId uint) el.ConstraintLevel

func (*ElementRepository) CopyToCluster

func (r *ElementRepository) CopyToCluster(to int, from int, eId uint)

func (*ElementRepository) Count

func (r *ElementRepository) Count() int

func (*ElementRepository) GetElement

func (r *ElementRepository) GetElement(cId int, eId uint) (el.SketchElement, bool)

func (*ElementRepository) IdSet

func (r *ElementRepository) IdSet() *utils.Set

func (*ElementRepository) IsFixed

func (r *ElementRepository) IsFixed(eId uint) bool

func (*ElementRepository) IsShared

func (r *ElementRepository) IsShared(eId uint) bool

func (*ElementRepository) LogElements

func (r *ElementRepository) LogElements(level zerolog.Level)

func (*ElementRepository) MergeElements

func (r *ElementRepository) MergeElements(c1 int, c2 int)

Merge elements between two clusters Move shared items from c2 to c1 then reevaluate shared items for c1

func (*ElementRepository) MergeToRoot

func (r *ElementRepository) MergeToRoot(cluster int)

func (*ElementRepository) NextId

func (r *ElementRepository) NextId() uint

func (*ElementRepository) RemoveElement

func (r *ElementRepository) RemoveElement(rem uint)

func (*ElementRepository) ReplaceElement

func (r *ElementRepository) ReplaceElement(cId int, eId uint, e el.SketchElement)

func (*ElementRepository) SetConstraintLevel

func (r *ElementRepository) SetConstraintLevel(eId uint, level el.ConstraintLevel)

func (*ElementRepository) SharedElements

func (r *ElementRepository) SharedElements(c1 int, c2 int) *utils.Set

Jump to

Keyboard shortcuts

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