Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Public Types

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

Public Member Functions

 VuoCompositionDiff (void)
 Constructor.
 
 ~VuoCompositionDiff (void)
 Destructor.
 
void setDiff (char *diff)
 Replaces the composition diff string with diff.
 
ChangeType findNode (const char *nodeIdentifier, json_object **replacementObj)
 Searches compositionDiff for changes made to the node across a live-coding reload.
 
bool isNodeBeingRemovedOrReplaced (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).
 
bool isNodeBeingAddedOrReplaced (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).
 
bool isPortBeingReplaced (const char *portName, json_object *replacementObj)
 Returns true if the port is among the replacees across a live-coding reload.
 
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.
 
bool isCompositionStartingOrStopping (void)
 Returns true 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.
 

Member Enumeration Documentation

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 is being removed with a replacement provided or added as a replacement for another.

Constructor & Destructor Documentation

VuoCompositionDiff::VuoCompositionDiff ( void  )

Constructor.

VuoCompositionDiff::~VuoCompositionDiff ( void  )

Destructor.

Member Function Documentation

VuoCompositionDiff::ChangeType VuoCompositionDiff::findNode ( 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 VuoCompilerComposition::diffAgainstOlderComposition().

bool VuoCompositionDiff::isCompositionStartingOrStopping ( void  )

Returns true 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.

bool VuoCompositionDiff::isNodeBeingAddedOrReplaced ( 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).

bool VuoCompositionDiff::isNodeBeingRemovedOrReplaced ( 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).

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

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

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.

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.


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