#include <graph.h>
GraphLib contains some static functions for graphs.
Static Public Member Functions | |
static MAXON_METHOD Result< GraphAttribute > | CreateAttribute (const InternedId &attr, GraphAttributeInterface::FLAGS flags) |
static MAXON_METHOD Result< GraphMessage > | CreateMessage (GraphAttributeInterface::FLAGS flags, const NodePath &origin, const ConstDataPtr &value) |
static MAXON_METHOD Result< GraphModelRef > | CreateSimpleGraphModel () |
static MAXON_METHOD Result< void > | WriteGml (const GraphModelRef &graph, UrlOrOutputStream &&output) |
static MAXON_METHOD ErrorInterface::PartFormatter | CreatePathFormatter (const GraphModelRef &graph) |
static MAXON_METHOD Result< NodePath > | ExtractNodePath (const String &message) |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (GraphLib, MAXON_REFERENCE_NONE, "net.maxon.graph.interface.graphlib") | |
|
private |
|
static |
Creates a GraphAttribute with the given name and flags
[in] | attr | The name of the attribute. |
[in] | flags | The flags of the attribute. |
|
static |
Creates a GraphMessage.
[in] | flags | The flags of the message. |
[in] | origin | The origin of the message. |
[in] | value | The ToString function of value will be called to implement GraphMessageInterface::Format. |
|
static |
Creates a new instance of a simple implementation of 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.
|
static |
Writes a graph to a GML file (Graph Modeling Language).
[in] | graph | The graph to write. |
[in] | output | The output stream to write to. |
|
static |
Returns a PartFormatter which formats NodePath and GraphNode parts using their effective names. Also DataType parts are formatted with the help of DataTypeBuilderInterface::GetDataTypeName.
[in] | graph | The graph to use for name lookup. |
|
static |
Extracts a node path from the given message. If the message was formatted by the formatter created by CreatePathFormatter, this function will find the first occurrence of a formatted node path and return its original NodePath. Otherwise it will return an empty node path (unless the message happens to contain a substring which matches a formatted node path).
[in] | message | An error message created by CreatePathFormatter. |