Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* WIP created GenerateJob plugin for generating exec code * WIP moved templates to GenerateJob * WIP #1014 GenerateJob tests passing * WIP #1014 Added attribute file test * WIP #1014 Added more GenerateJob tests * WIP #1014 removed extra logs * WIP #1014 Follow base for plugin, namespace * WIP #1014 Added CodeGen component settings * WIP #1014 Removed component settings * WIP #1014 Fixed the loading of inputs * WIP #1014 Fixed namespace detection * WIP #1014 Fixed code gen of job refs * WIP #1014 Fixed 2nd degree code gen * WIP #1014 Removed old code generation file * WIP #1014 Fixed code linting issues * WIP #1014 Fixed blob fetch error handling * WIP #1014 fixed error handling for bad blob fetch * WIP #1014 Updated the commit hash for the ptr code gen * WIP #1014 save after forwarding data from the successful job * WIP #1014 updated error msg on blob retrieval fail * WIP #1014 fixed code linting issues
- Loading branch information
Showing
16 changed files
with
563 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*globals define */ | ||
// This is a mixin containing helpers for working with operation nodes | ||
define([],function() { | ||
|
||
var OperationOps = function() { | ||
}; | ||
|
||
OperationOps.prototype.getOutputs = function (node) { | ||
return this.getOperationData(node, this.META.Outputs); | ||
}; | ||
|
||
OperationOps.prototype.getInputs = function (node) { | ||
return this.getOperationData(node, this.META.Inputs); | ||
}; | ||
|
||
OperationOps.prototype.getOperationData = function (node, metaType) { | ||
// Load the children and the output's children | ||
return this.core.loadChildren(node) | ||
.then(containers => { | ||
var outputs = containers.find(c => this.core.isTypeOf(c, metaType)); | ||
return outputs ? this.core.loadChildren(outputs) : []; | ||
}) | ||
.then(outputs => { | ||
var bases = outputs.map(node => this.core.getMetaType(node)); | ||
// return [[arg1, Type1, node1], [arg2, Type2, node2]] | ||
return outputs.map((node, i) => [ | ||
this.getAttribute(node, 'name'), | ||
this.getAttribute(bases[i], 'name'), | ||
node | ||
]); | ||
}); | ||
}; | ||
|
||
return OperationOps; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.