gatelogue_aggregator.types.node.base.Node

class gatelogue_aggregator.types.node.base.Node(*, i: ID = None, source: set[str] = <factory>)

Bases: Node, Mergeable, Struct, Generic

__init__()

Methods

NS()

__init__()

acceptable_list_node_types()

acceptable_single_node_types()

connect(ctx, node[, value, source])

connect_one(ctx, node[, value, source])

disconnect(ctx, node)

equivalent(ctx, other)

export(ctx)

get_all(ctx, ty[, conn_ty])

get_all_id(ctx, ty[, conn_ty])

get_edge(ctx, node[, ty])

get_edges(ctx, node[, ty])

get_one(ctx, ty[, conn_ty])

get_one_id(ctx, ty[, conn_ty])

merge(ctx, other)

merge_attrs(ctx, other)

merge_if_equivalent(ctx, other)

merge_key(ctx)

merge_lists(ctx, self, other)

new(ctx, **kwargs)

process_code(s)

ref(ctx)

sanitise_strings()

str_ctx(_ctx)

Attributes

i

The ID of the node

source

All sources that prove the node's existence

classmethod NS()
acceptable_list_node_types()
acceptable_single_node_types()
connect(ctx: CTX, node: Node, value: Any | None = None, source: set[str] | None = None)
connect_one(ctx: CTX, node: Node, value: Any | None = None, source: set[str] | None = None)
disconnect(ctx: CTX, node: Node)
equivalent(ctx: CTX, other: Self) bool
export(ctx: CTX) gt.Node
get_all(ctx: CTX, ty: type[T], conn_ty: type | None = None) Iterator[T]
get_all_id(ctx: CTX, ty: type[Node], conn_ty: type | None = None) list[Sourced[int]]
get_edge(ctx: CTX, node: Node, ty: type[T] | None = None) Sourced[T] | None
get_edges(ctx: CTX, node: Node, ty: type[T] | None = None) Iterator[Sourced[T]]
get_one(ctx: CTX, ty: type[T], conn_ty: type | None = None) T | None
get_one_id(ctx: CTX, ty: type[Node], conn_ty: type | None = None) Sourced[int] | None
i: ID

The ID of the node

merge(ctx: CTX, other: Self)
merge_attrs(ctx: CTX, other: Self)
merge_if_equivalent(ctx: CTX, other: Self) bool
merge_key(ctx: CTX) str
static merge_lists(ctx: CTX, self: list[T], other: list[T])
classmethod new(ctx: CTX, **kwargs) Self
static process_code(s: T) T
ref(ctx: CTX) NodeRef[Self]
sanitise_strings()
source: set[str]

All sources that prove the node’s existence

str_ctx(_ctx: CTX) str