#include <nodes_import.h>
SerializationNodeData represents the data of a Node, PortList or Port for serialization. It can be adapted by an ImportAdapter to the current version, for example if attribute values shall be modified. @MAXON_ANNOTATION{noUnresolved}
Public Types | |
enum class | CHILD_MODE { ADD , INHERIT , REMOVE } |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (SerializationNodeData, MAXON_REFERENCE_NONE, "net.maxon.node.interface.serializationdata", MAXON_IMPLEMENTATION_MODULE("net.maxon.nodes")) | |
|
strong |
|
private |
MAXON_METHOD const NodePath& GetPath | ( | ) | const |
Returns the complete node path of this node.
MAXON_METHOD MapInterface<InternedId, Data>& GetAttributes | ( | ) |
Returns the attributes of this node. An ImportAdapter can use this to modify, add or remove attribute values.
MAXON_METHOD MapInterface<NodePath, Wires>& GetTargets | ( | ) |
Returns the targets of this port. The map represents the outgoing connections of a port where the target port is identified by its path. An ImportAdapter can modify the connections by direct modification of the map.
MAXON_METHOD IdAndVersion& GetBaseTemplate | ( | ) |
Returns the asset identifier of the base template for this SerializationNodeData. An ImportAdapter can modify the identifier to handle renaming of node assets. The asset identifier is defined only for true nodes, but not if this serialization node represents a port or port list.
MAXON_METHOD DataDictionary& GetBaseTemplateArguments | ( | ) |
Returns the template arguments for the base template for this SerializationNodeData. Template arguments are defined only for true nodes, but not if this serialization node represents a port or port list.
MAXON_METHOD Result<Bool> GetChildren | ( | const ValueReceiver< SerializationNodeData & > & | receiver | ) |
Yields the children of this node to #receiver.
[in] | receiver | All children are reported to this receiver. |
MAXON_METHOD SerializationNodeData* FindChild | ( | const Id & | child | ) |
Finds the child of this node with the given identifer.
[in] | child | Identifier of the child. |
MAXON_METHOD void RemoveChild | ( | const Id & | child | ) |
Removes the child of this node with the given identifier (if it exists).
[in] | child | Identifier of the child. |
enum maxon::nodes::SerializationNodeData::CHILD_MODE MAXON_ENUM_LIST_CLASS | ( | CHILD_MODE | ) |
MAXON_METHOD Result<SerializationNodeData*> FindOrAddChild | ( | const InternedId & | child, |
CHILD_MODE | mode, | ||
const IdAndVersion & | base = GetZeroRef< IdAndVersion >() , |
||
const DataDictionary & | baseArgs = DataDictionary::DefaultValue() , |
||
ASSET_UPDATE_POLICY | updatePolicy = ASSET_UPDATE_POLICY::IMPLICIT |
||
) |
Adds a new child node entry to the serialization data, or returns the already existing one. The added parameter has to be set correctly:
[in] | child | Identifier of the child. |
[in] | mode | CHILD_MODE::ADD if the child node didn't exist in the deserialized NodeSystem without the new child node entry, CHILD_MODE::INHERIT if the child node is inherited from a base, or CHILD_MODE::REMOVE if you want to flag an inherited node as to be removed. |
[in] | base | Identifier of the base template to use for the node. Only needed for true nodes when mode is CHILD_MODE::ADD. |
[in] | baseArgs | Identifier of the base template arguments to use for the node. Only needed for true nodes when mode is CHILD_MODE::ADD. |
[in] | updatePolicy | The update policy to use when the base template is resolved. Only needed for true nodes when mode is CHILD_MODE::ADD. |
MAXON_METHOD ASSET_UPDATE_POLICY& GetUpdatePolicy | ( | ) |
Returns a reference to the asset update policy for the base template of the SerializationNodeData. The update policy is used only for true nodes, but not if this serialization node represents a port or port list.
MAXON_METHOD CHILD_MODE GetChildMode | ( | ) | const |
Returns the child mode of this entry.
MAXON_METHOD Result<void> SetBaseTemplate | ( | const IdAndVersion & | newAid | ) |
Sets the asset identifier of the base template for this SerializationNodeData. An ImportAdapter can modify the identifier to handle renaming of node assets. The asset identifier is defined only for true nodes, but not if this serialization node represents a port or port list.
[in] | newAid | The asset identifier of the new base template to use. |
MAXON_METHOD const IdAndVersion& GetBaseTemplate | ( | ) | const |
Returns the asset identifier of the base template for this SerializationNodeData. An ImportAdapter can modify the identifier to handle renaming of node assets. The asset identifier is defined only for true nodes, but not if this serialization node represents a port or port list.
MAXON_METHOD Result<void> SetUpdatePolicy | ( | ASSET_UPDATE_POLICY | newPolicy | ) |
Sets the asset update policy of the base template for this SerializationNodeData. The update policy is used only for true nodes, not for ports or port lists.
[in] | newPolicy | The new base template asset update policy. |
MAXON_METHOD ASSET_UPDATE_POLICY GetUpdatePolicy | ( | ) | const |
Returns the asset update policy of the base template for this SerializationNodeData. The update policy is used only for true nodes, but not if this serialization node represents a port or port list.
MAXON_METHOD Result<void> SetBaseTemplateLink | ( | const AssetLink & | newLink | ) |
Sets a link to the base template's asset for this SerializationNodeData. Note that this will override any existing origin data.
[in] | newLink | The new base template's asset link. |
MAXON_METHOD const AssetLink& GetBaseTemplateLink | ( | ) | const |
Returns the link to the base template's asset for this SerializationNodeData.
MAXON_METHOD Result<void> SetBaseTemplateArguments | ( | const DataDictionary & | args | ) |
Overwrites the template arguments for the base template for this SerializationNodeData. Template arguments are defined only for true nodes, but not if this serialization node represents a port or port list.
[in] | args | The new base template arguments. |
MAXON_METHOD const DataDictionary& GetBaseTemplateArguments | ( | ) | const |
Returns the template arguments for the base template for this SerializationNodeData. Template arguments are defined only for true nodes, but not if this serialization node represents a port or port list.