Workspace 6.21.5
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
DifferenceProcessor Class Reference

#include <Tools/WorkflowComparison/differenceprocessor.h>

Inheritance diagram for DifferenceProcessor:
[legend]

Public Member Functions

 DifferenceProcessor ()
 
void processDifferences (const DataExecution::ObjectArray &differences, DataExecution::Workspace &workspace, ComparisonRole desc, DataExecution::Workspace &otherWorkspace)
 
- Public Member Functions inherited from BasicTextLogger
 BasicTextLogger ()
 
virtual ~BasicTextLogger ()
 
void logLine (const Application::LogManager::MessageCategory &category, const QString &msg) const
 
void logLine (const QString &msg) const
 
void logText (const Application::LogManager::MessageCategory &category, const QString &msg) const
 
void logText (const QString &msg) const
 

Static Public Member Functions

static bool findOperation (QUuid guid, DataExecution::Operation **operation, DataExecution::Workspace **workspace)
 
static bool findWorkspace (QUuid guid, DataExecution::Workspace **workspace)
 

Protected Member Functions

int createGhostAnchors (const DataExecution::ObjectArray &anchorDifferences, DataExecution::Workspace &workspace, ComparisonRole desc) const
 
int createGhostConnections (const DataExecution::ObjectArray &operationDifferences, DataExecution::Workspace &workspace) const
 
int createGhostInputs (const DataExecution::ObjectArray &inputDifferences, DataExecution::Operation &operation, ComparisonRole desc) const
 
int createGhostNotes (const DataExecution::ObjectArray &noteDifferences, DataExecution::Workspace &workspace, ComparisonRole desc) const
 
DataExecution::OperationcreateGhostOperation (const DataExecution::Operation &altOp, DataExecution::Workspace &workspace) const
 
int createGhostOutputs (const DataExecution::ObjectArray &outputDifferences, DataExecution::Operation &operation, ComparisonRole desc) const
 

Constructor & Destructor Documentation

◆ DifferenceProcessor()

Member Function Documentation

◆ createGhostAnchors()

int createGhostAnchors ( const DataExecution::ObjectArray anchorDifferences,
DataExecution::Workspace workspace,
ComparisonRole  desc 
) const
protected
Parameters
anchorDifferencesArray of differences between anchors in a pair of workspaces in two different workflows.
workspaceThe workspace onto which to add anchors that do not exist.
descThe workflow descriptor indicating whether workspace is taking the role of workflow A or workflow B in the comparison
Returns
The number of anchors created.

◆ createGhostConnections()

int createGhostConnections ( const DataExecution::ObjectArray operationDifferences,
DataExecution::Workspace workspace 
) const
protected
Parameters
operationDifferencesArray of differences between a set of operations in two different workflows.
workspaceThe workspace containing some of the operations referenced in the differences array.
Returns
The number of connections created.

◆ createGhostInputs()

int createGhostInputs ( const DataExecution::ObjectArray inputDifferences,
DataExecution::Operation operation,
ComparisonRole  desc 
) const
protected
Parameters
inputDifferencesArray of differences between inputs in two different workflows.
operationThe operation onto which to add inputs that do not exist.
descThe workflow descriptor indicating whether workspace is taking the role of workflow A or workflow B in the comparison
Returns
The number of inputs created.

◆ createGhostNotes()

int createGhostNotes ( const DataExecution::ObjectArray noteDifferences,
DataExecution::Workspace workspace,
ComparisonRole  desc 
) const
protected
Parameters
noteDifferencesArray of differences between notes in a pair of workspaces in two different workflows.
workspaceThe workspace into which to add notes that do not exist.
descThe workflow descriptor indicating whether workspace is taking the role of workflow A or workflow B in the comparison
Returns
The number of notes created.

◆ createGhostOperation()

DataExecution::Operation & createGhostOperation ( const DataExecution::Operation altOp,
DataExecution::Workspace workspace 
) const
protected
Parameters
altOpThe original operation (which exists in the alternate workflow) for which a ghost operation is required in workspace.
workspaceThe workspace in which to create the new ghost operation.

Creates a ghost operation; a Placeholder clone of the specified operation with exactly the same inputs / outputs.

◆ createGhostOutputs()

int createGhostOutputs ( const DataExecution::ObjectArray outputDifferences,
DataExecution::Operation operation,
ComparisonRole  desc 
) const
protected
Parameters
outputDifferencesArray of differences between outputs in two different workflows.
operationThe operation onto which to add outputs that do not exist.
descThe workflow descriptor indicating whether workspace is taking the role of workflow A or workflow B in the comparison
Returns
The number of outputs created.

◆ findOperation()

bool findOperation ( QUuid  guid,
DataExecution::Operation **  operation,
DataExecution::Workspace **  workspace 
)
static

Looks for an operation given a target uuid and a parent workspace. The workspace is searched recursively

If the operation is found, then the workspace is updated to hold the direct parent workspace of the operation

Parameters
guidThe Uuid of the target operation
operationOperation address returned (if found)
workspaceParent workspace. Set this to a top-level workspace that should
Returns
true if the operation is found

◆ findWorkspace()

bool findWorkspace ( QUuid  guid,
DataExecution::Workspace **  workspace 
)
static

◆ processDifferences()

void processDifferences ( const DataExecution::ObjectArray differences,
DataExecution::Workspace workspace,
ComparisonRole  desc,
DataExecution::Workspace otherWorkspace 
)

Now that we've created any and all ghost operations, we can look for missing connections. There are two ways missing connections will be identified:

  1. Where there are connection differences recorded
  2. Where ghost operations are created. No connection differences will be recorded in this case, because the specific operation the connection differences are stored against is not present in this workflow.