A collection of nodes and the cables connecting them.
|
| VuoCompilerComposition (VuoComposition *baseComposition, VuoCompilerGraphvizParser *parser) |
| Creates a composition.
|
|
| ~VuoCompilerComposition (void) |
| Destructor.
|
|
VuoCompilerGraph * | getCachedGraph (void) |
| Returns the graph for this composition, using the most recently generated graph if it still applies.
|
|
void | check (void) |
| Checks that the composition is valid (able to be compiled).
|
|
void | checkForMissingNodeClasses (void) |
| Checks that all of the nodes in the composition have a node class known to the compiler.
|
|
void | checkFeedback (set< VuoCompilerCable * > potentialCables=set< VuoCompilerCable * >()) |
| Checks that the structure of feedback loops in the composition is valid.
|
|
void | updateGenericPortTypes (void) |
| Gives each group/network of connected generic ports a unique generic type.
|
|
set< set< VuoCompilerPort * > > | groupGenericPortsByType (bool useOriginalType) |
| Puts the generic ports in the composition into sets, where all ports in a set have the same generic type.
|
|
set< VuoPort * > | getConnectedGenericPorts (VuoPort *port) |
| Returns the set of ports that have the same innermost generic type as the given port.
|
|
void | setUniqueGraphvizIdentifierForNode (VuoNode *node) |
| If the given node has the same Graphviz identifier as another node currently in the composition, a node that was in the composition when it was originally parsed from Graphviz, or a node that was previously passed through this function, changes the given node's Graphviz identifier to one that has never been used by this composition.
|
|
void | clearGraphvizNodeIdentifierHistory () |
| Clears the map containing the records of previously used Graphviz node identifiers.
|
|
VuoPort * | findNearestUpstreamTriggerPort (VuoNode *node) |
| Returns the trigger port that is nearest upstream to node, or null if no trigger is upstream.
|
|
void | setModule (Module *module) |
| Takes ownership of the LLVM module containing the compiled composition.
|
|
string | getGraphvizDeclaration (string header="", string footer="") |
| Returns the .vuo (Graphviz dot format) representation of this composition.
|
|
string | getGraphvizDeclarationForComponents (set< VuoNode * > nodeSet, set< VuoCable * > cableSet, vector< VuoPublishedPort * > publishedInputPorts, vector< VuoPublishedPort * > publishedOutputPorts, string header="", string footer="", double xPositionOffset=0, double yPositionOffset=0) |
| Returns the .vuo (Graphviz dot format) representation of the given nodes and cables in this composition.
|
|
string | diffAgainstOlderComposition (string oldCompositionGraphvizDeclaration, VuoCompiler *compiler, const set< NodeReplacement > &nodeReplacements) |
| Returns a string representation of a comparison between the old and the current composition.
|
|
| VuoBaseDetail (string description, VuoComposition *base) |
| Creates a VuoComposition detail class.
|
|
VuoComposition * | getBase (void) const |
| Returns the VuoComposition detail class instance's base class instance.
|
|
void | setBase (VuoComposition *base) |
| Sets the VuoComposition detail class instance's base class instance.
|
|
string VuoCompilerComposition::diffAgainstOlderComposition |
( |
string |
oldCompositionGraphvizDeclaration, |
|
|
VuoCompiler * |
compiler, |
|
|
const set< NodeReplacement > & |
nodeReplacements |
|
) |
| |
Returns a string representation of a comparison between the old and the current composition.
The string representation is based on the JSON Patch format, with some extensions. The key used for each node is its Graphviz identifier. Unlike the examples below (spaced for readability), the returned string contains no whitespace.
The comparison follows the compiler's rule that the PublishedInputs and PublishedOutputs pseudo-nodes are either both present or both absent in a compiled composition.
- Example:
[
{"add" : "FireOnStart", "value" : {"nodeClass" : "vuo.event.fireOnStart"}},
{"remove" : "Round"}
]
- Example:
[
{"add" : "MakeList2", "value" : {"nodeClass" : "vuo.list.make.3.VuoInteger"}},
{"remove" : "MakeList1"},
{"map" : "MakeList1", "to" : "MakeList2",
"ports" : [
{"map" : "1", "to" : "1"},
{"map" : "2", "to" : "2"},
{"map" : "list", "to" : "list}
]
}
]
- Example:
[
{"add" : "PublishedInputs"},
{"remove" : "PublishedInputs"},
{"map" : "PublishedInputs", "to" : "PublishedInputs",
"ports" : [
{"map" : "firstInput", "to" : "firstInput"}
]
},
{"add" : "PublishedOutputs"},
{"remove" : "PublishedOutputs"},
{"map" : "PublishedOutputs", "to" : "PublishedOutputs",
"ports" : [
{"map" : "firstOutput", "to" : "firstOutput"}
]
}
]
- Example:
[
{"add" : "PublishedInputs"},
{"add" : "PublishedOutputs"}
]
This needs to be kept in sync with VuoRuntime function findNodeInCompositionDiff()
.