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 replacingDictionaryKeyList;
68 bool replacingDictionaryValueList;
69 set<VuoCable *> incomingCables;
70 set<VuoCable *> outgoingCables;
71 vector<VuoRendererNode *> collapsedTypecasts;
72 map<VuoRendererNode *, set<VuoCable *> > incomingCablesForTypecast;
73 map<VuoRendererNode *, VuoPort *> hostPortForTypecast;
74 vector<pair<VuoPort *, VuoPublishedPort *> > revertedPublishedInternalExternalPortCombinations;
75 vector<pair<VuoPort *, VuoPublishedPort *> > updatedPublishedInternalExternalPortCombinations;
76 map<VuoRendererNode *, vector<pair<VuoPort *, VuoPublishedPort *> > > publishedInternalExternalPortCombinationsForTypecast;
77 map<pair<VuoPort *, VuoPublishedPort *>,
bool> publishedConnectionCarriedData;
78 map<VuoCable *, VuoPort *> originalFromPortForCable;
79 map<VuoCable *, VuoPort *> originalToPortForCable;
80 map<VuoPort *, string> constantValueForOriginalPort;
82 void createPortMappings();
84 bool valueShouldCarryOver(
VuoPort *oldInputPort,
VuoPort *newInputPort);