28 VuoCommandReplaceNode(map<VuoRendererNode *, VuoRendererNode *> newNodeForOldNode,
VuoEditorWindow *window,
string commandDescription,
bool preserveDanglingCables=
false,
bool resetConstantValues=
false);
35 static const int commandID;
37 string revertedSnapshot;
38 string updatedSnapshot;
42 bool operationInvolvesGenericPort;
44 class SingleNodeReplacement;
45 void initialize(
VuoEditorWindow *window,
string commandDescription, map<VuoRendererNode *, VuoRendererNode *> newNodeForOldNode,
bool preserveDanglingCables,
bool resetConstantValues);
50 class SingleNodeReplacement
55 void createAllMappings();
60 map<VuoPort *, VuoPort *> updatedPortForOriginalPort;
64 bool preserveDanglingCables;
65 bool resetConstantValues;
67 bool replacingDictionaryValueList;
68 set<VuoCable *> incomingCables;
69 set<VuoCable *> outgoingCables;
70 vector<VuoRendererNode *> collapsedTypecasts;
71 map<VuoRendererNode *, set<VuoCable *> > incomingCablesForTypecast;
72 map<VuoRendererNode *, VuoPort *> hostPortForTypecast;
73 vector<pair<VuoPort *, VuoPublishedPort *> > revertedPublishedInternalExternalPortCombinations;
74 vector<pair<VuoPort *, VuoPublishedPort *> > updatedPublishedInternalExternalPortCombinations;
75 map<VuoRendererNode *, vector<pair<VuoPort *, VuoPublishedPort *> > > publishedInternalExternalPortCombinationsForTypecast;
76 map<pair<VuoPort *, VuoPublishedPort *>,
bool> publishedConnectionCarriedData;
77 map<VuoCable *, VuoPort *> originalFromPortForCable;
78 map<VuoCable *, VuoPort *> originalToPortForCable;
79 map<VuoPort *, string> constantValueForOriginalPort;
81 void createPortMappings();
83 bool valueShouldCarryOver(
VuoPort *oldInputPort,
VuoPort *newInputPort);