maxon.GraphLib¶
Description¶
GraphLib contains some static functions for graphs.
Inheritance diagram¶
Inheritance
Methods Signature¶
|
Creates a |
|
Creates a GraphMessage. |
|
Creates a new instance of a simple implementation of
maxon.GraphModelInterface . |
|
Writes a graph to a GML file (Graph Modeling Language). |
Methods Definition¶
-
static
GraphLib.
CreateAttribute
(*args)¶ Creates a
maxon.GraphAttribute
with the given name and flags.- Parameters
attr (
maxon.InternedId
) – The name of the attribute.flags (
maxon.GraphAttributeInterface.FLAGS
) – The flags of the attribute.
- Returns
A new
maxon.GraphAttribute
with the given name and flags.- Return type
-
static
GraphLib.
CreateMessage
(*args)¶ Creates a GraphMessage.
- Parameters
flags (
maxon.GraphAttributeInterface.FLAGS
) – The flags of the message.origin (
maxon.NodePath
) – The origin of the message.value (
maxon.Data
) – The ToString function of value will be called to implement GraphMessageInterface.Format.
- Returns
A new
maxon.GraphMessage
for the given parameters.- Return type
-
static
GraphLib.
CreateSimpleGraphModel
(*args)¶ - Creates a new instance of a simple implementation of
maxon.GraphModelInterface
.The simple graph model only manages plain nodes, ports and connections, but it doesn’t support advanced features like inheritance from base graphs, derived attributes, implicit connections, rollback of transactions or change lists.- Returns
A new
maxon.GraphModelRef
which uses a simple implementation ofmaxon.GraphModelInterface
.- Return type
-
static
GraphLib.
WriteGml
(*args)¶ Writes a graph to a GML file (Graph Modeling Language).
- Parameters
graph (
maxon.GraphModelRef
) – The graph to write.output (Union[
maxon.Url
,maxon.OutputStreamInterface
]) – The output stream to write to.
- Returns