-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2051 from xodio/feat-records
Implement record patches feature
- Loading branch information
Showing
67 changed files
with
4,159 additions
and
230 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,25 @@ | ||
node { | ||
meta { | ||
struct Type { | ||
{{#each inputs}} | ||
{{#if (isConstantType type)}}static constexpr {{/if~}} | ||
typeof_{{ pinKey }} field_{{ pinKey }} | ||
{{~#if (isConstantType type)}} = constant_input_{{ pinKey }}{{/if}}; | ||
{{/each}} | ||
}; | ||
} | ||
|
||
void evaluate(Context ctx) { | ||
Type record; | ||
|
||
{{#each inputs}} | ||
{{#unless (isConstantType type)}} | ||
record.field_{{ pinKey }} = getValue<input_{{ pinKey }}>(ctx); | ||
{{/unless}} | ||
{{/each}} | ||
|
||
{{#each outputs}} | ||
emitValue<output_{{ pinKey }}>(ctx, record); | ||
{{/each}} | ||
} | ||
} |
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,31 @@ | ||
node { | ||
// Define types for templatable custom outputs | ||
meta { | ||
{{#each inputs}} | ||
{{#each ../outputs}} | ||
{{#if isTemplatableCustomTypePin}} | ||
typedef decltype(get_member_type(&typeof_{{ ../pinKey }}::field_{{ recordField }})) typeof_{{ pinKey }}; | ||
{{/if}} | ||
{{/each}} | ||
{{/each}} | ||
} | ||
|
||
// Define constant outputs | ||
{{#each inputs}} | ||
{{#each ../outputs}} | ||
{{#if (isConstantType type)}} | ||
static constexpr typeof_{{ pinKey }} constant_output_{{ pinKey }} = typeof_{{ ../pinKey }}::field_{{ recordField }}; | ||
{{/if}} | ||
{{/each}} | ||
{{/each}} | ||
void evaluate(Context ctx) { | ||
{{#each inputs}} | ||
auto record = getValue<input_{{ pinKey }}>(ctx); | ||
{{/each}} | ||
{{#each outputs}} | ||
{{#unless (isConstantType type)}} | ||
emitValue<output_{{ pinKey }}>(ctx, record.field_{{ recordField }}); | ||
{{/unless}} | ||
{{/each}} | ||
} | ||
} |
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
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
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
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
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
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.