Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeCreator ¶
type NodeCreator func(common.History, common.NameVersion) Object
type Object ¶
type Object interface { common.HistorySource IsNode() *common.NameVersion }
type TreeNode ¶
type TreeNode struct { common.NameVersion History common.History CausedBy Object // the object causing the synthesized node to be inserted }
type TreeObject ¶
type TreeObject struct { Graph string Object Object Node *TreeNode // for synthesized nodes this entry is used if no object can be synthesized }
TreeObject is an element enriched by a textual tree graph prefix line.
func (*TreeObject) String ¶
func (t *TreeObject) String() string
type TreeObjects ¶
type TreeObjects []*TreeObject
func MapToTree ¶
func MapToTree(objs Objects, creator NodeCreator, symbols ...string) TreeObjects
MapToTree maps a list of elements featuring a resolution history into a list of elements providing an ascii tree graph field Intermediate nodes are synthesized, so only leaf elements are required. If an element should act as explicit node, it must state to be a node, in this case the node will be tagged with the nodeSymbol. If this is not desired, pass an empty symbol string.
func (TreeObjects) Get ¶
func (o TreeObjects) Get(i int) interface{}
func (TreeObjects) Iterator ¶
func (o TreeObjects) Iterator() data.Iterator
func (TreeObjects) Len ¶
func (o TreeObjects) Len() int
func (TreeObjects) String ¶ added in v0.16.0
func (o TreeObjects) String() string
type ValidTreeElement ¶
type ValidTreeElement interface {
IsValid() bool
}
Click to show internal directories.
Click to hide internal directories.