Documentation
¶
Index ¶
- type ConstraintAccessor
- type ConstraintRepository
- func (r *ConstraintRepository) AddConstraint(c *constraint.Constraint) *constraint.Constraint
- func (r *ConstraintRepository) Clear()
- func (r *ConstraintRepository) ConstraintsForElement(eId uint) []*constraint.Constraint
- func (r *ConstraintRepository) Count() int
- func (r *ConstraintRepository) GetConstraint(cId uint) (*constraint.Constraint, bool)
- func (r *ConstraintRepository) IdSet() *utils.Set
- func (r *ConstraintRepository) IsMet(constr uint, cluster int, ea ElementAccessor) bool
- func (r *ConstraintRepository) LogConstraints(level zerolog.Level)
- func (r *ConstraintRepository) NextId() uint
- func (r *ConstraintRepository) RemoveConstraint(cId uint)
- func (r *ConstraintRepository) ReplaceElement(original, new uint)
- func (r *ConstraintRepository) SetConstraintElement(oldId uint, newElement uint)
- type ElementAccessor
- type ElementRepository
- func (r *ElementRepository) AddElement(e el.SketchElement) el.SketchElement
- func (r *ElementRepository) AddElementToCluster(eId uint, cId int)
- func (r *ElementRepository) Clear()
- func (r *ElementRepository) ClearClusters()
- func (r *ElementRepository) Cluster(eId uint) (uint, bool)
- func (r *ElementRepository) ConstraintLevel(eId uint) el.ConstraintLevel
- func (r *ElementRepository) CopyToCluster(to int, from int, eId uint)
- func (r *ElementRepository) Count() int
- func (r *ElementRepository) GetElement(cId int, eId uint) (el.SketchElement, bool)
- func (r *ElementRepository) IdSet() *utils.Set
- func (r *ElementRepository) IsFixed(eId uint) bool
- func (r *ElementRepository) IsShared(eId uint) bool
- func (r *ElementRepository) LogElements(level zerolog.Level)
- func (r *ElementRepository) MergeElements(c1 int, c2 int)
- func (r *ElementRepository) MergeToRoot(cluster int)
- func (r *ElementRepository) NextId() uint
- func (r *ElementRepository) RemoveElement(rem uint)
- func (r *ElementRepository) ReplaceElement(cId int, eId uint, e el.SketchElement)
- func (r *ElementRepository) SetConstraintLevel(eId uint, level el.ConstraintLevel)
- func (r *ElementRepository) SharedElements(c1 int, c2 int) *utils.Set
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 (r *ConstraintRepository) AddConstraint(c *constraint.Constraint) *constraint.Constraint
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)
AddElement(el.SketchElement) el.SketchElement
AddElementToCluster(uint, int)
SetConstraintLevel(uint, el.ConstraintLevel)
ConstraintLevel(uint) el.ConstraintLevel
ReplaceElement(int, uint, el.SketchElement)
RemoveElement(uint)
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 (r *ElementRepository) AddElement(e el.SketchElement) el.SketchElement
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
Click to show internal directories.
Click to hide internal directories.