MCPcopy Create free account
hub / github.com/cogentcore/core / InitNode

Function InitNode

tree/admin.go:51–57  ·  view source on GitHub ↗

InitNode initializes the node. It should not be called by end-user code. It must be exported since it is referenced in generic functions included in yaegi.

(n Node)

Source from the content-addressed store, hash-verified

49// InitNode initializes the node. It should not be called by end-user code.
50// It must be exported since it is referenced in generic functions included in yaegi.
51func InitNode(n Node) {
52 nb := n.AsTree()
53 if nb.This != n {
54 nb.This = n
55 nb.This.Init()
56 }
57}
58
59// SetParent sets the parent of the given node to the given parent node.
60// This is only for nodes with no existing parent; see [MoveToParent] to

Callers 7

UpdateSliceFunction · 0.85
AddChildMethod · 0.85
NewChildMethod · 0.85
InsertChildMethod · 0.85
CloneMethod · 0.85
NewFunction · 0.85
NewOfTypeFunction · 0.85

Calls 2

AsTreeMethod · 0.65
InitMethod · 0.65

Tested by

no test coverage detected