Vuo  0.5.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VuoCompilerComposition Class Reference

Description

A collection of nodes and the cables connecting them.

Public Member Functions

 VuoCompilerComposition (VuoComposition *baseComposition, VuoCompilerGraphvizParser *parser)
 Creates a composition.
 
VuoNodegetPublishedInputNode (void)
 Returns the psuedo-node that contains the published input ports, or NULL if this composition has no published input ports.
 
VuoNodegetPublishedOutputNode (void)
 Returns the psuedo-node that contains the published output ports, or NULL if this composition has no published output ports.
 
void setPublishedInputNode (VuoNode *node)
 Sets the psuedo-node that contains the published input ports.
 
void setPublishedOutputNode (VuoNode *node)
 Sets the psuedo-node that contains the published output ports.
 
string getGraphvizDeclaration (string header="", string footer="")
 Returns the .vuo (Graphviz dot format) representation of this composition.
 
string getGraphvizDeclarationForComponents (set< VuoNode * > nodeSet, set< VuoCable * > cableSet, 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)
 Returns a string representation of a comparison between the old and the current composition.
 
- Public Member Functions inherited from VuoBaseDetail< VuoComposition >
 VuoBaseDetail (string description, VuoComposition *base)
 Creates a VuoComposition detail class.
 
VuoCompositiongetBase (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.
 

Static Public Member Functions

static VuoCompilerCompositionnewCompositionFromGraphvizDeclaration (const string &compositionGraphvizDeclaration, VuoCompiler *compiler)
 Creates a composition from the Graphviz-formatted string representation of a composition.
 

Static Public Attributes

static const string defaultGraphDeclaration = "digraph G\n"
 The default graph type and ID to be generated for new .vuo (Graphviz dot format) composition files.
 

Constructor & Destructor Documentation

VuoCompilerComposition::VuoCompilerComposition ( VuoComposition baseComposition,
VuoCompilerGraphvizParser parser 
)

Creates a composition.

If a non-null parser is provided, the composition is populated from the parser. Otherwise, the composition is empty.

Member Function Documentation

string VuoCompilerComposition::diffAgainstOlderComposition ( string  oldCompositionGraphvizDeclaration,
VuoCompiler compiler 
)

Returns a string representation of a comparison between the old and the current composition.

This needs to be kept in sync with VuoRuntime function isNodeInBothCompositions().

The string representation has the JSON Patch format. The key used for each node is its Graphviz identifier. Unlike the example below (spaced for readability), the returned string contains no whitespace.

Example:
[
{"add" : "FireOnStart", "value" : {"nodeClass" : "vuo.event.fireOnStart"}},
{"remove" : "Round"}
]
string VuoCompilerComposition::getGraphvizDeclaration ( string  header = "",
string  footer = "" 
)

Returns the .vuo (Graphviz dot format) representation of this composition.

string VuoCompilerComposition::getGraphvizDeclarationForComponents ( set< VuoNode * >  nodeSet,
set< VuoCable * >  cableSet,
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.

VuoNode * VuoCompilerComposition::getPublishedInputNode ( void  )

Returns the psuedo-node that contains the published input ports, or NULL if this composition has no published input ports.

VuoNode * VuoCompilerComposition::getPublishedOutputNode ( void  )

Returns the psuedo-node that contains the published output ports, or NULL if this composition has no published output ports.

VuoCompilerComposition * VuoCompilerComposition::newCompositionFromGraphvizDeclaration ( const string &  compositionGraphvizDeclaration,
VuoCompiler compiler 
)
static

Creates a composition from the Graphviz-formatted string representation of a composition.

void VuoCompilerComposition::setPublishedInputNode ( VuoNode node)

Sets the psuedo-node that contains the published input ports.

void VuoCompilerComposition::setPublishedOutputNode ( VuoNode node)

Sets the psuedo-node that contains the published output ports.

Member Data Documentation

const string VuoCompilerComposition::defaultGraphDeclaration = "digraph G\n"
static

The default graph type and ID to be generated for new .vuo (Graphviz dot format) composition files.


The documentation for this class was generated from the following files: