tag_paths

package
v0.0.0-...-791c77c Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeDirect = Type(iota)
	TypeSuper
	TypeIndirect
	TypeSelf
	TypeUnknown
)

describe these

Variables

This section is empty.

Functions

func GetPool

func GetPool() interfaces.Pool[Path, *Path]

Types

type Path

type Path []*Tag

func (*Path) Add

func (p *Path) Add(es ...*Tag)

func (*Path) AddPath

func (a *Path) AddPath(b *Path)

func (*Path) Cap

func (p *Path) Cap() int

func (*Path) Clone

func (a *Path) Clone() *Path

func (*Path) CloneAndAddPath

func (a *Path) CloneAndAddPath(c *Path) *Path

func (*Path) Compare

func (a *Path) Compare(b *Path) int

func (*Path) Copy

func (a *Path) Copy() (b *Path)

func (*Path) Equals

func (a *Path) Equals(b *Path) bool

func (*Path) First

func (a *Path) First() *Tag

func (*Path) IsEmpty

func (a *Path) IsEmpty() bool

func (*Path) Last

func (a *Path) Last() *Tag

func (*Path) Len

func (p *Path) Len() int

func (*Path) Less

func (p *Path) Less(i, j int) bool

func (*Path) ReadFrom

func (p *Path) ReadFrom(r io.Reader) (n int64, err error)

func (*Path) String

func (p *Path) String() string

func (*Path) Swap

func (p *Path) Swap(i, j int)

func (*Path) WriteTo

func (p *Path) WriteTo(w io.Writer) (n int64, err error)

type PathWithType

type PathWithType struct {
	Path
	Type
}

func MakePathWithType

func MakePathWithType(els ...*Tag) *PathWithType

func (*PathWithType) Clone

func (a *PathWithType) Clone() (b *PathWithType)

func (*PathWithType) ReadFrom

func (p *PathWithType) ReadFrom(r io.Reader) (n int64, err error)

func (*PathWithType) String

func (p *PathWithType) String() string

func (*PathWithType) WriteTo

func (p *PathWithType) WriteTo(w io.Writer) (n int64, err error)

type PathsWithTypes

type PathsWithTypes []*PathWithType

func (*PathsWithTypes) AddNonEmptyPath

func (s *PathsWithTypes) AddNonEmptyPath(p *PathWithType)

func (*PathsWithTypes) AddPath

func (s *PathsWithTypes) AddPath(p *PathWithType) (idx int, alreadyExists bool)

func (PathsWithTypes) ContainsPath

func (s PathsWithTypes) ContainsPath(p *PathWithType) (int, bool)

func (PathsWithTypes) Len

func (s PathsWithTypes) Len() int

func (PathsWithTypes) Less

func (s PathsWithTypes) Less(i, j int) bool

func (*PathsWithTypes) Reset

func (a *PathsWithTypes) Reset()

func (PathsWithTypes) Swap

func (s PathsWithTypes) Swap(i, j int)

type SlicePaths

type SlicePaths []*Path

func (*SlicePaths) AddNonEmptyPath

func (s *SlicePaths) AddNonEmptyPath(p *Path)

func (*SlicePaths) AddPath

func (s *SlicePaths) AddPath(p *Path) (idx int, alreadyExists bool)

func (SlicePaths) ContainsPath

func (s SlicePaths) ContainsPath(p *Path) (int, bool)

func (SlicePaths) Len

func (s SlicePaths) Len() int

func (SlicePaths) Less

func (s SlicePaths) Less(i, j int) bool

func (*SlicePaths) Reset

func (a *SlicePaths) Reset()

func (SlicePaths) Swap

func (s SlicePaths) Swap(i, j int)

type StringBackward

type StringBackward Path

func (*StringBackward) String

func (p *StringBackward) String() string

type StringForward

type StringForward Path

func (*StringForward) String

func (p *StringForward) String() string

type Tag

type Tag = catgut.String

type TagWithParentsAndTypes

type TagWithParentsAndTypes struct {
	*Tag
	Parents PathsWithTypes
}

func (TagWithParentsAndTypes) String

func (ewp TagWithParentsAndTypes) String() string

type Tags

type Tags struct {
	Paths PathsWithTypes // TODO implement
	All   TagsWithParentsAndTypes
}

func (*Tags) AddPath

func (es *Tags) AddPath(p *PathWithType) (err error)

func (*Tags) AddPathWithType

func (es *Tags) AddPathWithType(pwt *PathWithType) (err error)

func (*Tags) AddSelf

func (es *Tags) AddSelf(e *Tag) (err error)

func (*Tags) AddSuperFrom

func (a *Tags) AddSuperFrom(
	b *Tags,
	prefix *Tag,
) (err error)

func (*Tags) AddTag

func (es *Tags) AddTag(e *Tag) (err error)

func (*Tags) AddTagOld

func (es *Tags) AddTagOld(e ids.Tag) (err error)

func (*Tags) Reset

func (a *Tags) Reset()

func (*Tags) ResetWith

func (a *Tags) ResetWith(b *Tags)

TODO improve performance

func (*Tags) Set

func (s *Tags) Set(v string) (err error)

func (*Tags) String

func (a *Tags) String() string

type TagsWithParentsAndTypes

type TagsWithParentsAndTypes []TagWithParentsAndTypes

func (*TagsWithParentsAndTypes) Add

func (s *TagsWithParentsAndTypes) Add(
	e1 *Tag,
	p *PathWithType,
) (err error)

TODO return success

func (TagsWithParentsAndTypes) ContainsObjectIdTag

func (s TagsWithParentsAndTypes) ContainsObjectIdTag(
	k *ids.ObjectId,
) (int, bool)

func (TagsWithParentsAndTypes) ContainsObjectIdTagExact

func (s TagsWithParentsAndTypes) ContainsObjectIdTagExact(
	k *ids.ObjectId,
) (int, bool)

func (TagsWithParentsAndTypes) ContainsString

func (s TagsWithParentsAndTypes) ContainsString(
	value string,
) (int, bool)

func (TagsWithParentsAndTypes) ContainsTag

func (s TagsWithParentsAndTypes) ContainsTag(e *Tag) (int, bool)

func (TagsWithParentsAndTypes) GetMatching

func (s TagsWithParentsAndTypes) GetMatching(
	e *Tag,
) (matching []TagWithParentsAndTypes)

func (TagsWithParentsAndTypes) Len

func (s TagsWithParentsAndTypes) Len() int

func (*TagsWithParentsAndTypes) Remove

func (s *TagsWithParentsAndTypes) Remove(e1 *Tag) (err error)

TODO return success

func (*TagsWithParentsAndTypes) Reset

func (s *TagsWithParentsAndTypes) Reset()

func (TagsWithParentsAndTypes) StringCommaSeparatedExplicit

func (s TagsWithParentsAndTypes) StringCommaSeparatedExplicit() string

type Type

type Type byte

func (Type) IsDirectOrSelf

func (t Type) IsDirectOrSelf() bool

TODO determine if this should include type self

func (Type) ReadByte

func (t Type) ReadByte() (byte, error)

func (*Type) ReadFrom

func (t *Type) ReadFrom(r io.Reader) (n int64, err error)

func (*Type) SetDirect

func (t *Type) SetDirect()

func (Type) String

func (i Type) String() string

func (Type) WriteTo

func (t Type) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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