Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C codegen to put Enum inside parent object namespace #13047

Merged
merged 3 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/app/zap-templates/templates/app/cluster-objects.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ namespace {{asUpperCamelCase label}} {
{{! forceNotOptional=true because the optionality is on the attribute
itself, but we want just the type of the attribute. }}
{{#if entryType}}
using Type = {{zapTypeToEncodableClusterObjectType entryType forceNotOptional=true}};
using DecodableType = {{zapTypeToDecodableClusterObjectType entryType forceNotOptional=true}};
using DecodableArgType = {{zapTypeToDecodableClusterObjectType entryType forceNotOptional=true isArgument=true}};
using Type = {{zapTypeToEncodableClusterObjectType entryType ns=parent.name forceNotOptional=true}};
using DecodableType = {{zapTypeToDecodableClusterObjectType entryType ns=parent.name forceNotOptional=true}};
using DecodableArgType = {{zapTypeToDecodableClusterObjectType entryType ns=parent.name forceNotOptional=true isArgument=true}};
{{else}}
using Type = {{zapTypeToEncodableClusterObjectType type forceNotOptional=true}};
using DecodableType = {{zapTypeToDecodableClusterObjectType type forceNotOptional=true}};
using DecodableArgType = {{zapTypeToDecodableClusterObjectType type forceNotOptional=true isArgument=true}};
using Type = {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}};
using DecodableType = {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotOptional=true}};
using DecodableArgType = {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotOptional=true isArgument=true}};
{{/if}}

static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; }
Expand Down
Loading