CopyDictionary
This nested class is used during copying to hold a mapping of original nodes to newly copied nodes and original links to newly copied links.
Implements: ICopyDictionary
Properties
public DataCollection<NodeType, NodeKey, PortKey, LinkType> Copies { get; }
value = copyDictionary.Copies
Gets the collection of copied nodes and copied links as a DataCollection.
public GraphLinksModel<NodeType, NodeKey, PortKey, LinkType> DestinationModel { get; set; }
value = copyDictionary.DestinationModel
copyDictionary.DestinationModel = value
Gets or sets the destination model for the copying operation.
public DataCollection<NodeType, NodeKey, PortKey, LinkType> SourceCollection { get; set; }
value = copyDictionary.SourceCollection
copyDictionary.SourceCollection = value
Gets or sets the source collection of data to be copied for the copying operation.
public GraphLinksModel<NodeType, NodeKey, PortKey, LinkType> SourceModel { get; set; }
value = copyDictionary.SourceModel
copyDictionary.SourceModel = value
Gets or sets the source model for the copying operation.
Methods
public void AddCopiedLink(LinkType oldlink, LinkType newlink)
copyDictionary.AddCopiedLink(oldlink, newlink)
Declare the mapping of a source link data to a copied link data.
- oldlink
- a link data in the source collection
- newlink
- a copied link data, or null to indicate that there is no copied link data for a given source link data
public void AddCopiedNode(NodeType oldnode, NodeType newnode)
copyDictionary.AddCopiedNode(oldnode, newnode)
Declare the mapping of a source node data to a copied node data.
- oldnode
- a node data in the source collection
- newnode
- a copied node data, or null to indicate that there is no copied node data for a given source node data
public bool ContainsSourceLink(LinkType oldlink)
result = copyDictionary.ContainsSourceLink(oldlink)
This predicate is true if the given link data is in the source collection.
- oldlink
public bool ContainsSourceNode(NodeType oldnode)
result = copyDictionary.ContainsSourceNode(oldnode)
This predicate is true if the given node data is in the source collection.
- oldnode
public LinkType FindCopiedLink(LinkType oldlink)
result = copyDictionary.FindCopiedLink(oldlink)
Look up the copied link for a given source link.
- oldlink
- a source link data
Returns: the copied link data
public NodeType FindCopiedNode(NodeType oldnode)
result = copyDictionary.FindCopiedNode(oldnode)
Look up the copied node for a given source node.
- oldnode
- a source node data
Returns: the copied node data
public void RemoveSourceLink(LinkType srclinkdata)
copyDictionary.RemoveSourceLink(srclinkdata)
Remove any association between a source link data and any copied link data.
- srclinkdata
- a link data in the source collection
public void RemoveSourceNode(NodeType srcnodedata)
copyDictionary.RemoveSourceNode(srcnodedata)
Remove any association between a source node data and any copied node data.
- srcnodedata
- a node data in the source collection