#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 } |
Public Member Functions | |
MAXON_METHOD const NodePath & | GetPath () const |
MAXON_METHOD MapInterface< InternedId, Data > & | GetAttributes () |
MAXON_METHOD MapInterface< NodePath, Wires > & | GetTargets () |
MAXON_METHOD IdAndVersion & | GetBaseTemplate () |
MAXON_METHOD DataDictionary & | GetBaseTemplateArguments () |
MAXON_METHOD Result< Bool > | GetChildren (const ValueReceiver< SerializationNodeData & > &receiver) |
MAXON_METHOD SerializationNodeData * | FindChild (const Id &child) |
MAXON_METHOD void | RemoveChild (const Id &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::NullValue(), ASSET_UPDATE_POLICY updatePolicy=ASSET_UPDATE_POLICY::IMPLICIT) |
MAXON_METHOD ASSET_UPDATE_POLICY & | GetUpdatePolicy () |
MAXON_METHOD CHILD_MODE | GetChildMode () const |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (SerializationNodeData, MAXON_REFERENCE_NONE, "net.maxon.node.interface.serializationdata") | |
|
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 of the node system data. An ImportAdapter can modify the identifier to handle renamings 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 of the node system data. 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 identifer (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::NullValue() , |
||
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 node system data. 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.