-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPPSDK: callback generation + types: with generation changes + templa…
…te updates
- Loading branch information
1 parent
195bce4
commit c19dda8
Showing
105 changed files
with
270 additions
and
78 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
languages/cpp/templates/callback-context-instantiation/additionalProperties.cpp
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,6 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
${if.namespace.notsame}${info.Title}::${end.if.namespace.notsame}JsonData_${title}::Iterator elements = elements.Current().Variants(); | ||
while (elements.Next()) { | ||
${property}.insert(elements.Label(), elements.Current().${additional.type}; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/anyOf.cpp
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 @@ | ||
${property}; |
6 changes: 6 additions & 0 deletions
6
languages/cpp/templates/callback-context-instantiation/array.cpp
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,6 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
auto index(element.Current().Elements()); | ||
while (index.Next() == true) { | ||
${property}.push_back(index.Current().Value()); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
languages/cpp/templates/callback-context-instantiation/enum.cpp
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,3 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
${property} = WPEFramework::Core::EnumerateType<${if.namespace.notsame}${info.Title}::${end.if.namespace.notsame}${title}>(elements.Current().String().c_str(), false).Value(); | ||
} |
3 changes: 3 additions & 0 deletions
3
languages/cpp/templates/callback-context-instantiation/generic.cpp
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,3 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
${property} = elements.Current().Value(); | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/namespace.cpp
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame} |
8 changes: 8 additions & 0 deletions
8
languages/cpp/templates/callback-context-instantiation/object.cpp
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,8 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
WPEFramework::Core::JSON::VariantContainer container = elements.Current().Object(); | ||
std::string strContainer; | ||
container.ToString(strContainer); | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}JsonData_${title} response; | ||
response.FromString(strContainer); | ||
${properties} | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/primitive.cpp
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 @@ | ||
${type} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/property.cpp
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 @@ | ||
${shape} ${if.non.const}${if.non.anyOf}${if.non.array}${if.non.object}${base.title}.${property} = response.${Property};${end.if.non.object}${end.if.non.array}${end.if.non.anyOf}${end.if.non.const} |
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 @@ | ||
${shape} |
3 changes: 3 additions & 0 deletions
3
languages/cpp/templates/callback-context-instantiation/string.cpp
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,3 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
${property} = elements.Current().Value().c_str(); | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/anyOf.cpp
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 @@ | ||
${Title} |
3 changes: 3 additions & 0 deletions
3
languages/cpp/templates/callback-context-instantiation/sub-property/anyOfSchemaShape.cpp
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,3 @@ | ||
string ${property}Str; | ||
response.${Property.dependency}${Property}.ToString(${property}Str); | ||
${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = ${property}Str; |
5 changes: 5 additions & 0 deletions
5
languages/cpp/templates/callback-context-instantiation/sub-property/array.cpp
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,5 @@ | ||
${if.impl.array.optional}${base.title}.${property} = std::make_optional<${type}>();${end.if.impl.array.optional} | ||
auto index(response.${Property}.Elements()); | ||
while (index.Next() == true) { | ||
${if.object}${items.with.indent}${end.if.object}${if.non.object} ${base.title}.${property}${if.impl.array.optional}.value()${end.if.impl.array.optional}.push_back(index.Current().Value());${end.if.non.object} | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/const.cpp
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 @@ | ||
${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = response.${Property.dependency}${Property}; |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/generic.cpp
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 @@ | ||
${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = response.${Property.dependency}${Property}; |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/namespace.cpp
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame} |
4 changes: 4 additions & 0 deletions
4
languages/cpp/templates/callback-context-instantiation/sub-property/object-array.cpp
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,4 @@ | ||
${type} ${property}Result${level}; | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}JsonData_${title} jsonResult = index.Current(); | ||
${properties} | ||
${base.title}.${property}${if.impl.array.optional}.value()${end.if.impl.array.optional}.push_back(${property}Result${level}); |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/object-separator.cpp
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 @@ | ||
. |
3 changes: 3 additions & 0 deletions
3
languages/cpp/templates/callback-context-instantiation/sub-property/object.cpp
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,3 @@ | ||
${if.impl.optional} | ||
${base.title}${property.dependency} = std::make_optional<${type}>();${end.if.impl.optional} | ||
${properties} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/property.cpp
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 @@ | ||
${shape} ${if.non.const}${if.non.anyOf}${if.non.array}${if.non.object}${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = response.${Property.dependency}${Property};${end.if.non.object}${end.if.non.array}${end.if.non.anyOf}${end.if.non.const} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/ref.h
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 @@ | ||
${shape} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/sub-property/title.cpp
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 @@ | ||
${Title} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-context-instantiation/title.cpp
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 @@ | ||
${Title} |
4 changes: 4 additions & 0 deletions
4
languages/cpp/templates/callback-context-instantiation/tuple.cpp
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,4 @@ | ||
if (strcmp(elements.Label(), "${property}") == 0) { | ||
${property}.first = elements.Current().Get(0); | ||
${property}.second = elements.Current().Get(1); | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-initialization/additionalProperties.cpp
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame}${title} ${property}; |
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 @@ | ||
{property}; |
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 @@ | ||
${type} ${property}; |
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame}${title} ${property}; |
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 @@ | ||
${type} ${property}; |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-initialization/object-empty-property.cpp
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 @@ | ||
std::string ${property}; |
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame}${title} ${property}; |
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 @@ | ||
${type} |
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 @@ | ||
${Title} |
12 changes: 12 additions & 0 deletions
12
languages/cpp/templates/callback-instantiation/generic.cpp
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,12 @@ | ||
WPEFramework::Core::JSON::VariantContainer::Iterator elements = proxyResponse->Variants(); | ||
while (elements.Next()) { | ||
${callback.result.instantiation} | ||
else if (strcmp(elements.Label(), "context") == 0) { | ||
WPEFramework::Core::JSON::VariantContainer::Iterator params = elements.Current().Object().Variants(); | ||
while (params.Next()) { | ||
${callback.param.instantiation.with.indent} | ||
} | ||
} else { | ||
ASSERT(false); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-response-instantiation/additionalProperties.cpp
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 @@ | ||
${property} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/callback-response-instantiation/generic.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
response | ||
${property} |
10 changes: 6 additions & 4 deletions
10
languages/cpp/templates/callback-result-instantiation/additionalProperties.cpp
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}JsonData_${title} elements = (*proxyResponse)->Variants(); | ||
${if.namespace.notsame}${info.Title}::${end.if.namespace.notsame}${title} response; | ||
${if.namespace.notsame}${info.Title}::${end.if.namespace.notsame}JsonData_${title}::Iterator elements = proxyResponse->Variants(); | ||
while (elements.Next()) { | ||
response.insert(elements.Label(), elements.Current().${additional.type}.Value()); | ||
} | ||
${if.not.default} ${namespace}${key} key = WPEFramework::Core::EnumerateType<${namespace}${key}>(elements.Label(), false).Value();${end.if.not.default}${if.default} ${key} key = elements.Label();${end.if.default} | ||
${property}.emplace(std::piecewise_construct, | ||
std::forward_as_tuple(key), | ||
std::forward_as_tuple(elements.Current().${additional.type})); | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-instantiation/anyOf.cpp
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 @@ | ||
${property}; |
7 changes: 3 additions & 4 deletions
7
languages/cpp/templates/callback-result-instantiation/array.cpp
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
auto index((*proxyResponse)->Elements()); | ||
${type} response; | ||
auto index(proxyResponse->Elements()); | ||
while (index.Next() == true) { | ||
response.push_back(index.Current().Value()); | ||
} | ||
${property}.push_back(index.Current().Value()); | ||
} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/callback-result-instantiation/generic.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${type} response = (*proxyResponse)->Value(); | ||
${property} = proxyResponse->Value(); |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-instantiation/namespace.cpp
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame} |
1 change: 0 additions & 1 deletion
1
languages/cpp/templates/callback-result-instantiation/object.cpp
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
${title} response; | ||
${properties} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/callback-result-instantiation/property.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${shape} ${if.non.object}response.${property} = (*proxyResponse)->${Property};${end.if.non.object} | ||
${shape} ${if.non.const}${if.non.anyOf}${if.non.array}${if.non.object}${base.title}.${property} = proxyResponse->${Property};${end.if.non.object}${end.if.non.array}${end.if.non.anyOf}${end.if.non.const} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-instantiation/sub-property/anyOf.cpp
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 @@ | ||
${Title} |
3 changes: 3 additions & 0 deletions
3
languages/cpp/templates/callback-result-instantiation/sub-property/anyOfSchemaShape.cpp
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,3 @@ | ||
string ${property}Str; | ||
proxyResponse->${Property.dependency}${Property}.ToString(${property}Str); | ||
${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = ${property}Str; |
5 changes: 5 additions & 0 deletions
5
languages/cpp/templates/callback-result-instantiation/sub-property/array.cpp
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,5 @@ | ||
${if.impl.array.optional}${base.title}.${property} = std::make_optional<${type}>();${end.if.impl.array.optional} | ||
auto index(proxyResponse->${Property}.Elements()); | ||
while (index.Next() == true) { | ||
${if.object}${items.with.indent}${end.if.object}${if.non.object} ${base.title}.${property}${if.impl.array.optional}.value()${end.if.impl.array.optional}.push_back(index.Current().Value());${end.if.non.object} | ||
} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-instantiation/sub-property/const.cpp
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 @@ | ||
${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = proxyResponse->${Property.dependency}${Property}; |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-instantiation/sub-property/namespace.cpp
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame} |
4 changes: 4 additions & 0 deletions
4
languages/cpp/templates/callback-result-instantiation/sub-property/object-array.cpp
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,4 @@ | ||
${type} ${property}Result${level}; | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}JsonData_${title} jsonResult = index.Current(); | ||
${properties} | ||
${property}response.${property}${if.impl.array.optional}.value()${end.if.impl.array.optional}.push_back(${property}Result${level}); |
2 changes: 2 additions & 0 deletions
2
languages/cpp/templates/callback-result-instantiation/sub-property/object.cpp
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
${if.impl.optional} | ||
${base.title}${property.dependency} = std::make_optional<${type}>();${end.if.impl.optional} | ||
${properties} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/callback-result-instantiation/sub-property/property.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${shape} ${if.non.object}response.${property.dependency}${property} = (*proxyResponse)->${Property.dependency}${Property};${end.if.non.object} | ||
${shape} ${if.non.const}${if.non.anyOf}${if.non.array}${if.non.object}${base.title}${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property} = proxyResponse->${Property.dependency}${Property};${end.if.non.object}${end.if.non.array}${end.if.non.anyOf}${end.if.non.const} |
6 changes: 2 additions & 4 deletions
6
languages/cpp/templates/callback-result-instantiation/tuple.cpp
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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
auto index((*proxyResponse)->Elements()); | ||
${if.namespace.notsame}${info.Title}::${end.if.namespace.notsame}${title} response; | ||
response.first = index.Get(0); | ||
response.second = index.Get(1); | ||
${property}.first = proxyResponse->Get(0); | ||
${property}.second = proxyResponse->Get(1); |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-serialization/additionalProperties.cpp
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 @@ | ||
WPEFramework::Core::ProxyType<WPEFramework::Core::JSON::VariantContainer>& proxyResponse = *(reinterpret_cast<WPEFramework::Core::ProxyType<WPEFramework::Core::JSON::VariantContainer>*>(jsonResponse)); |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-serialization/generic.cpp
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 @@ | ||
WPEFramework::Core::ProxyType<${method.result.json}>& proxyResponse = *(reinterpret_cast<WPEFramework::Core::ProxyType<${method.result.json}>*>(jsonResponse)); |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/callback-result-serialization/primitive.cpp
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 @@ | ||
${type} |
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 @@ | ||
${shape} |
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 @@ | ||
WPEFramework::Core::ProxyType<WPEFramework::Core::JSON::VariantContainer>& proxyResponse = *(reinterpret_cast<WPEFramework::Core::ProxyType<WPEFramework::Core::JSON::VariantContainer>*>(jsonResponse)); |
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 @@ | ||
|
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 @@ | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
/* anyOf schema shape is not supported right now */ | ||
/* anyOf schema shape is not supported right now */ |
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 @@ | ||
FireboltSDK::JSON::String |
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 |
---|---|---|
@@ -1 +1 @@ | ||
WPEFramework::Core::JSON::DecSInt32 | ||
WPEFramework::Core::JSON::DecSInt32 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ | |
} | ||
|
||
return ${method.result.name}; | ||
}${method.setter} | ||
}${method.setter} |
9 changes: 9 additions & 0 deletions
9
languages/cpp/templates/parameter-serialization/additionalProperties.cpp
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,9 @@ | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}${title} map = ${property}${if.impl.optional}.value()${end.if.impl.optional}; | ||
WPEFramework::Core::JSON::Variant ${property}Variant; | ||
for (auto element: map) { | ||
WPEFramework::Core::JSON::Variant jsonElement = element.second; | ||
WPEFramework::Core::JSON::VariantContainer jsonContainer; | ||
jsonContainer.Set(element.first.c_str(), jsonElement); | ||
${property}Variant = jsonContainer; | ||
} | ||
jsonParameters.Set(_T("${property}"), ${property}Variant); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}JsonData_${title} jsonValue = ${property}${if.optional}.value()${end.if.optional}; | ||
WPEFramework::Core::JSON::Variant ${Property}(jsonValue.Data()); | ||
jsonParameters.Set(_T("${property}"), ${Property}); | ||
jsonParameters.Set(_T("${property}"), ${Property}); |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
WPEFramework::Core::JSON::Variant ${Property}(${property}${if.optional}.value()${end.if.optional}); | ||
jsonParameters.Set(_T("${property}"), ${Property}); | ||
jsonParameters.Set(_T("${property}"), ${Property}); |
2 changes: 2 additions & 0 deletions
2
languages/cpp/templates/parameter-serialization/object-empty-property.cpp
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,2 @@ | ||
WPEFramework::Core::JSON::Variant ${Property}(${property}${if.optional}.value()${end.if.optional}); | ||
jsonParameters.Set(_T("${property}"), ${Property}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
${shape} ${if.non.object}${base.Title}Container.${Property} = element${if.base.optional}.value()${end.if.base.optional}.${property}${if.optional}.value()${end.if.optional};${end.if.non.object} | ||
${shape} ${if.non.const}${if.non.anyOf}${if.non.array}${if.non.object}${base.Title}Container.${Property} = element.${property}${if.optional}.value()${end.if.optional};${end.if.non.object}${end.if.non.array}${end.if.non.anyOf}${end.if.non.const} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/parameter-serialization/sub-property/anyOf.cpp
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 @@ | ||
${Title} |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/parameter-serialization/sub-property/anyOfSchemaShape.cpp
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 @@ | ||
${base.Title}Container.${Property.dependency}${Property} = element${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property}${if.optional}.value()${end.if.optional}; |
8 changes: 8 additions & 0 deletions
8
languages/cpp/templates/parameter-serialization/sub-property/array.cpp
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,8 @@ | ||
WPEFramework::Core::JSON::ArrayType<WPEFramework::Core::JSON::Variant> ${Property}; | ||
${type} ${property} = element.${property}${if.impl.array.optional}.value()${end.if.impl.array.optional}; | ||
for (auto& element : ${property}) { | ||
${if.object}${items.with.indent}${end.if.object}${if.non.object}${Property}.Add() = element;${end.if.non.object} | ||
} | ||
WPEFramework::Core::JSON::Variant ${Property}Variant; | ||
${Property}Variant.Array(${Property}); | ||
jsonParameters.Set(_T("${property}"), ${Property}Variant); |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/parameter-serialization/sub-property/const.cpp
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 @@ | ||
${base.Title}Container.${Property.dependency}${Property} = element${property.dependency}.${property}${if.optional}.value()${end.if.optional}; |
7 changes: 7 additions & 0 deletions
7
languages/cpp/templates/parameter-serialization/sub-property/object-array.cpp
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,7 @@ | ||
${if.namespace.notsame}Firebolt::${info.Title}::${end.if.namespace.notsame}JsonData_${title} ${Property}Container; | ||
${properties} | ||
string ${Property}Str; | ||
${Property}Container.ToString(${Property}Str); | ||
WPEFramework::Core::JSON::VariantContainer ${Property}VariantContainer(${Property}Str); | ||
WPEFramework::Core::JSON::Variant ${Property}Variant = ${Property}VariantContainer; | ||
${Property}.Add() = ${Property}Variant; |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/parameter-serialization/sub-property/object.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${properties} | ||
${properties} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/parameter-serialization/sub-property/property.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${shape} ${if.non.object}${title}.${Property.dependency}${Property} = element${if.base.optional}.value()${end.if.base.optional}.${property.dependency}${property}${if.optional}.value()${end.if.optional};${end.if.non.object} | ||
${shape} ${if.non.const}${if.non.anyOf}${if.non.array}${if.non.object}${base.Title}Container.${Property.dependency}${Property} = element${property.dependency}${if.impl.optional}.value()${end.if.impl.optional}.${property}${if.optional}.value()${end.if.optional};${end.if.non.object}${end.if.non.array}${end.if.non.anyOf}${end.if.non.const} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/parameter-serialization/sub-property/title.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${Title} | ||
${Title} |
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 @@ | ||
${Title} |
2 changes: 1 addition & 1 deletion
2
languages/cpp/templates/result-initialization/additionalProperties.cpp
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 |
---|---|---|
@@ -1 +1 @@ | ||
${Title} ${property}; | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame}${Title} ${property}; |
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 @@ | ||
std::string ${property}; |
1 change: 1 addition & 0 deletions
1
languages/cpp/templates/result-initialization/object-empty-property.cpp
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 @@ | ||
${if.namespace.notsame}${parent.Title}::${end.if.namespace.notsame}${Title} ${property}; |
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 @@ | ||
${shape} |
Oops, something went wrong.