Vuo  2.3.2
Public Types | Public Member Functions | List of all members
VuoCompositionDiff Class Reference

Description

Manages the diff between composition versions before and after a live-coding reload.

Definition at line 18 of file VuoCompositionDiff.hh.

Public Types

enum  ChangeType {
  ChangeStartStop , ChangeNone , ChangeAdd , ChangeRemove ,
  ChangeReplace , ChangeMove
}
 Possible changes to a node across a live-coding reload. More...
 

Public Member Functions

 VuoCompositionDiff (void)
 Constructor. More...
 
 ~VuoCompositionDiff (void)
 Destructor. More...
 
void setDiff (char *diff)
 Replaces the composition diff string with diff. More...
 
ChangeType findNode (const char *compositionIdentifier, const char *nodeIdentifier, json_object **replacementObj)
 Searches compositionDiff for changes made to the node across a live-coding reload. More...
 
bool isNodeBeingRemovedOrReplaced (const char *compositionIdentifier, const char *nodeIdentifier, json_object **replacementObj)
 Returns true if the node is among the removals or replacees across a live-coding reload, or if the composition is being stopped (not a live-coding reload). More...
 
bool isNodeBeingAddedOrReplaced (const char *compositionIdentifier, const char *nodeIdentifier, json_object **replacementObj)
 Returns true if the node is among the additions or replacers across a live-coding reload, or if the composition is being started (not a live-coding reload). More...
 
bool isPortBeingReplaced (const char *portName, json_object *replacementObj)
 Returns true if the port is among the replacees across a live-coding reload. More...
 
bool isPortReplacingAnother (const char *portName, json_object *replacementObj, string &oldNodeIdentifier, string &oldPortIdentifier)
 Returns true if the port is among the replacers across a live-coding reload. More...
 
bool isNodeBeingMovedToHere (const char *newCompositionIdentifier, const char *nodeIdentifier, json_object *replacementObj, string &oldCompositionIdentifier)
 Returns true if the node is being moved to the new composition across a live-coding reload. More...
 
bool isPortBeingCopied (const char *portName, json_object *replacementObj, string &destinationCompositionIdentifier, string &destinationPortIdentifier)
 Returns true if the port's data is being copied to another port across a live-coding reload. More...
 
bool isCompositionStartingOrStopping (void)
 Returns true if the composition is either starting for the first time or stopping for the last time, false if the composition is being restarted for a live-coding reload. More...
 

Member Enumeration Documentation

◆ ChangeType

Possible changes to a node across a live-coding reload.

Enumerator
ChangeStartStop 

The composition is being started or stopped (not a live-coding reload).

ChangeNone 

The node is carried across the live-coding reload.

ChangeAdd 

The node has been added.

ChangeRemove 

The node has been removed.

ChangeReplace 

The node has been removed with a replacement provided or added as a replacement for another.

ChangeMove 

The node has been moved to a different (sub)composition.

Definition at line 24 of file VuoCompositionDiff.hh.

Constructor & Destructor Documentation

◆ VuoCompositionDiff()

VuoCompositionDiff::VuoCompositionDiff ( void  )

Constructor.

Definition at line 18 of file VuoCompositionDiff.cc.

◆ ~VuoCompositionDiff()

VuoCompositionDiff::~VuoCompositionDiff ( void  )

Destructor.

Definition at line 26 of file VuoCompositionDiff.cc.

Member Function Documentation

◆ findNode()

VuoCompositionDiff::ChangeType VuoCompositionDiff::findNode ( const char *  compositionIdentifier,
const char *  nodeIdentifier,
json_object **  replacementObj 
)

Searches compositionDiff for changes made to the node across a live-coding reload.

This needs to be kept in sync with VuoCompilerCompositionDiff::diff.

Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Definition at line 81 of file VuoCompositionDiff.cc.

◆ isCompositionStartingOrStopping()

bool VuoCompositionDiff::isCompositionStartingOrStopping ( void  )

Returns true if the composition is either starting for the first time or stopping for the last time, false if the composition is being restarted for a live-coding reload.

Definition at line 296 of file VuoCompositionDiff.cc.

◆ isNodeBeingAddedOrReplaced()

bool VuoCompositionDiff::isNodeBeingAddedOrReplaced ( const char *  compositionIdentifier,
const char *  nodeIdentifier,
json_object **  replacementObj 
)

Returns true if the node is among the additions or replacers across a live-coding reload, or if the composition is being started (not a live-coding reload).

Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Definition at line 149 of file VuoCompositionDiff.cc.

◆ isNodeBeingMovedToHere()

bool VuoCompositionDiff::isNodeBeingMovedToHere ( const char *  newCompositionIdentifier,
const char *  nodeIdentifier,
json_object replacementObj,
string &  oldCompositionIdentifier 
)

Returns true if the node is being moved to the new composition across a live-coding reload.

Definition at line 233 of file VuoCompositionDiff.cc.

◆ isNodeBeingRemovedOrReplaced()

bool VuoCompositionDiff::isNodeBeingRemovedOrReplaced ( const char *  compositionIdentifier,
const char *  nodeIdentifier,
json_object **  replacementObj 
)

Returns true if the node is among the removals or replacees across a live-coding reload, or if the composition is being stopped (not a live-coding reload).

Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Definition at line 136 of file VuoCompositionDiff.cc.

◆ isPortBeingCopied()

bool VuoCompositionDiff::isPortBeingCopied ( const char *  portName,
json_object replacementObj,
string &  destinationCompositionIdentifier,
string &  destinationPortIdentifier 
)

Returns true if the port's data is being copied to another port across a live-coding reload.

Definition at line 259 of file VuoCompositionDiff.cc.

◆ isPortBeingReplaced()

bool VuoCompositionDiff::isPortBeingReplaced ( const char *  portName,
json_object replacementObj 
)

Returns true if the port is among the replacees across a live-coding reload.

Definition at line 159 of file VuoCompositionDiff.cc.

◆ isPortReplacingAnother()

bool VuoCompositionDiff::isPortReplacingAnother ( const char *  portName,
json_object replacementObj,
string &  oldNodeIdentifier,
string &  oldPortIdentifier 
)

Returns true if the port is among the replacers across a live-coding reload.

Definition at line 186 of file VuoCompositionDiff.cc.

◆ setDiff()

void VuoCompositionDiff::setDiff ( char *  diff)

Replaces the composition diff string with diff.

This class takes ownership of diff, so the caller should not free it.

Definition at line 36 of file VuoCompositionDiff.cc.


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