Skip to content

Commit

Permalink
Update again and zap regen: removed extra namespace prefixes in acces…
Browse files Browse the repository at this point in the history
…sors.h/cpp
  • Loading branch information
andy31415 committed Sep 9, 2024
1 parent b2b7353 commit 39e9015
Show file tree
Hide file tree
Showing 4 changed files with 7,565 additions and 7,715 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace {{asUpperCamelCase label}} {
{{#*inline "clusterId"}}Clusters::{{asUpperCamelCase parent.label}}::Id{{/inline}}
{{#*inline "sizingBytes"}}{{#if (isShortString type)}}1{{else}}2{{/if}}{{/inline}}

Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGetterType this}} value)
Protocols::InteractionModel::Status Get(EndpointId endpoint, {{accessorGetterType this}} value)
{
{{~#if (isString type)}}
{{#if isNullable}}
Expand Down Expand Up @@ -135,12 +135,12 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGet
{{/if}}
{{/inline}}

Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty)
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty)
{
{{> setBody passMarkDirty=true}}
}

Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value)
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value)
{
{{> setBody passMarkDirty=false}}
}
Expand Down Expand Up @@ -172,17 +172,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEn
{{/if}}
{{/inline}}

Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty)
Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
{
{{> setNullBody passMarkDirty=true}}
}

Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint)
Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
{
{{> setNullBody passMarkDirty=false}}
}

Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty)
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty)
{
if (value.IsNull()) {
return SetNull(endpoint, markDirty);
Expand All @@ -191,7 +191,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEn
return Set(endpoint, value.Value(), markDirty);
}

Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value)
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value)
{
if (value.IsNull()) {
return SetNull(endpoint);
Expand Down
14 changes: 7 additions & 7 deletions src/app/zap-templates/templates/app/attributes/Accessors.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ namespace Attributes {
{{/first}}
{{#unless (isStrEqual storagePolicy "attributeAccessInterface")}}
namespace {{asUpperCamelCase label}} {
Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGetterType this}} value); // {{type}}
Protocols::InteractionModel::Status Get(EndpointId endpoint, {{accessorGetterType this}} value); // {{type}}
{{! NOTE: Adding an optional arg instead of an overload can break API
consumers that are using the function type (e.g. in templates). }}
Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value);
Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty);
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value);
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty);
{{#if isNullable}}
Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint);
Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty);
Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value);
Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty);
Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value);
Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty);
{{/if}}
} // namespace {{asUpperCamelCase label}}

Expand Down
Loading

0 comments on commit 39e9015

Please sign in to comment.