Skip to content

Commit 4b81b96

Browse files
committed
Make Model structs final and replace final with override on methods
1 parent ec4f790 commit 4b81b96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+566
-566
lines changed

include/graphqlservice/introspection/DirectiveObject.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,35 @@ class [[nodiscard]] Directive final
3636
};
3737

3838
template <class T>
39-
struct [[nodiscard]] Model
39+
struct [[nodiscard]] Model final
4040
: Concept
4141
{
4242
explicit Model(std::shared_ptr<T> pimpl) noexcept
4343
: _pimpl { std::move(pimpl) }
4444
{
4545
}
4646

47-
[[nodiscard]] service::AwaitableScalar<std::string> getName() const final
47+
[[nodiscard]] service::AwaitableScalar<std::string> getName() const override
4848
{
4949
return { _pimpl->getName() };
5050
}
5151

52-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const final
52+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const override
5353
{
5454
return { _pimpl->getDescription() };
5555
}
5656

57-
[[nodiscard]] service::AwaitableScalar<std::vector<DirectiveLocation>> getLocations() const final
57+
[[nodiscard]] service::AwaitableScalar<std::vector<DirectiveLocation>> getLocations() const override
5858
{
5959
return { _pimpl->getLocations() };
6060
}
6161

62-
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<InputValue>>> getArgs() const final
62+
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<InputValue>>> getArgs() const override
6363
{
6464
return { _pimpl->getArgs() };
6565
}
6666

67-
[[nodiscard]] service::AwaitableScalar<bool> getIsRepeatable() const final
67+
[[nodiscard]] service::AwaitableScalar<bool> getIsRepeatable() const override
6868
{
6969
return { _pimpl->getIsRepeatable() };
7070
}

include/graphqlservice/introspection/EnumValueObject.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,30 @@ class [[nodiscard]] EnumValue final
3434
};
3535

3636
template <class T>
37-
struct [[nodiscard]] Model
37+
struct [[nodiscard]] Model final
3838
: Concept
3939
{
4040
explicit Model(std::shared_ptr<T> pimpl) noexcept
4141
: _pimpl { std::move(pimpl) }
4242
{
4343
}
4444

45-
[[nodiscard]] service::AwaitableScalar<std::string> getName() const final
45+
[[nodiscard]] service::AwaitableScalar<std::string> getName() const override
4646
{
4747
return { _pimpl->getName() };
4848
}
4949

50-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const final
50+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const override
5151
{
5252
return { _pimpl->getDescription() };
5353
}
5454

55-
[[nodiscard]] service::AwaitableScalar<bool> getIsDeprecated() const final
55+
[[nodiscard]] service::AwaitableScalar<bool> getIsDeprecated() const override
5656
{
5757
return { _pimpl->getIsDeprecated() };
5858
}
5959

60-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDeprecationReason() const final
60+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDeprecationReason() const override
6161
{
6262
return { _pimpl->getDeprecationReason() };
6363
}

include/graphqlservice/introspection/FieldObject.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,40 +38,40 @@ class [[nodiscard]] Field final
3838
};
3939

4040
template <class T>
41-
struct [[nodiscard]] Model
41+
struct [[nodiscard]] Model final
4242
: Concept
4343
{
4444
explicit Model(std::shared_ptr<T> pimpl) noexcept
4545
: _pimpl { std::move(pimpl) }
4646
{
4747
}
4848

49-
[[nodiscard]] service::AwaitableScalar<std::string> getName() const final
49+
[[nodiscard]] service::AwaitableScalar<std::string> getName() const override
5050
{
5151
return { _pimpl->getName() };
5252
}
5353

54-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const final
54+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const override
5555
{
5656
return { _pimpl->getDescription() };
5757
}
5858

59-
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<InputValue>>> getArgs() const final
59+
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<InputValue>>> getArgs() const override
6060
{
6161
return { _pimpl->getArgs() };
6262
}
6363

64-
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getType() const final
64+
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getType() const override
6565
{
6666
return { _pimpl->getType() };
6767
}
6868

69-
[[nodiscard]] service::AwaitableScalar<bool> getIsDeprecated() const final
69+
[[nodiscard]] service::AwaitableScalar<bool> getIsDeprecated() const override
7070
{
7171
return { _pimpl->getIsDeprecated() };
7272
}
7373

74-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDeprecationReason() const final
74+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDeprecationReason() const override
7575
{
7676
return { _pimpl->getDeprecationReason() };
7777
}

include/graphqlservice/introspection/InputValueObject.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,30 @@ class [[nodiscard]] InputValue final
3434
};
3535

3636
template <class T>
37-
struct [[nodiscard]] Model
37+
struct [[nodiscard]] Model final
3838
: Concept
3939
{
4040
explicit Model(std::shared_ptr<T> pimpl) noexcept
4141
: _pimpl { std::move(pimpl) }
4242
{
4343
}
4444

45-
[[nodiscard]] service::AwaitableScalar<std::string> getName() const final
45+
[[nodiscard]] service::AwaitableScalar<std::string> getName() const override
4646
{
4747
return { _pimpl->getName() };
4848
}
4949

50-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const final
50+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const override
5151
{
5252
return { _pimpl->getDescription() };
5353
}
5454

55-
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getType() const final
55+
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getType() const override
5656
{
5757
return { _pimpl->getType() };
5858
}
5959

60-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDefaultValue() const final
60+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDefaultValue() const override
6161
{
6262
return { _pimpl->getDefaultValue() };
6363
}

include/graphqlservice/introspection/SchemaObject.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,40 +38,40 @@ class [[nodiscard]] Schema final
3838
};
3939

4040
template <class T>
41-
struct [[nodiscard]] Model
41+
struct [[nodiscard]] Model final
4242
: Concept
4343
{
4444
explicit Model(std::shared_ptr<T> pimpl) noexcept
4545
: _pimpl { std::move(pimpl) }
4646
{
4747
}
4848

49-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const final
49+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const override
5050
{
5151
return { _pimpl->getDescription() };
5252
}
5353

54-
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<Type>>> getTypes() const final
54+
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<Type>>> getTypes() const override
5555
{
5656
return { _pimpl->getTypes() };
5757
}
5858

59-
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getQueryType() const final
59+
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getQueryType() const override
6060
{
6161
return { _pimpl->getQueryType() };
6262
}
6363

64-
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getMutationType() const final
64+
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getMutationType() const override
6565
{
6666
return { _pimpl->getMutationType() };
6767
}
6868

69-
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getSubscriptionType() const final
69+
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getSubscriptionType() const override
7070
{
7171
return { _pimpl->getSubscriptionType() };
7272
}
7373

74-
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<Directive>>> getDirectives() const final
74+
[[nodiscard]] service::AwaitableObject<std::vector<std::shared_ptr<Directive>>> getDirectives() const override
7575
{
7676
return { _pimpl->getDirectives() };
7777
}

include/graphqlservice/introspection/TypeObject.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,60 +46,60 @@ class [[nodiscard]] Type final
4646
};
4747

4848
template <class T>
49-
struct [[nodiscard]] Model
49+
struct [[nodiscard]] Model final
5050
: Concept
5151
{
5252
explicit Model(std::shared_ptr<T> pimpl) noexcept
5353
: _pimpl { std::move(pimpl) }
5454
{
5555
}
5656

57-
[[nodiscard]] service::AwaitableScalar<TypeKind> getKind() const final
57+
[[nodiscard]] service::AwaitableScalar<TypeKind> getKind() const override
5858
{
5959
return { _pimpl->getKind() };
6060
}
6161

62-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getName() const final
62+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getName() const override
6363
{
6464
return { _pimpl->getName() };
6565
}
6666

67-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const final
67+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getDescription() const override
6868
{
6969
return { _pimpl->getDescription() };
7070
}
7171

72-
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<Field>>>> getFields(std::optional<bool>&& includeDeprecatedArg) const final
72+
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<Field>>>> getFields(std::optional<bool>&& includeDeprecatedArg) const override
7373
{
7474
return { _pimpl->getFields(std::move(includeDeprecatedArg)) };
7575
}
7676

77-
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<Type>>>> getInterfaces() const final
77+
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<Type>>>> getInterfaces() const override
7878
{
7979
return { _pimpl->getInterfaces() };
8080
}
8181

82-
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<Type>>>> getPossibleTypes() const final
82+
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<Type>>>> getPossibleTypes() const override
8383
{
8484
return { _pimpl->getPossibleTypes() };
8585
}
8686

87-
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<EnumValue>>>> getEnumValues(std::optional<bool>&& includeDeprecatedArg) const final
87+
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<EnumValue>>>> getEnumValues(std::optional<bool>&& includeDeprecatedArg) const override
8888
{
8989
return { _pimpl->getEnumValues(std::move(includeDeprecatedArg)) };
9090
}
9191

92-
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<InputValue>>>> getInputFields() const final
92+
[[nodiscard]] service::AwaitableObject<std::optional<std::vector<std::shared_ptr<InputValue>>>> getInputFields() const override
9393
{
9494
return { _pimpl->getInputFields() };
9595
}
9696

97-
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getOfType() const final
97+
[[nodiscard]] service::AwaitableObject<std::shared_ptr<Type>> getOfType() const override
9898
{
9999
return { _pimpl->getOfType() };
100100
}
101101

102-
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getSpecifiedByURL() const final
102+
[[nodiscard]] service::AwaitableScalar<std::optional<std::string>> getSpecifiedByURL() const override
103103
{
104104
return { _pimpl->getSpecifiedByURL() };
105105
}

samples/learn/schema/CharacterObject.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@ class [[nodiscard]] Character final
2828
};
2929

3030
template <class T>
31-
struct [[nodiscard]] Model
31+
struct [[nodiscard]] Model final
3232
: Concept
3333
{
3434
explicit Model(std::shared_ptr<T> pimpl) noexcept
3535
: _pimpl { std::move(pimpl) }
3636
{
3737
}
3838

39-
[[nodiscard]] service::TypeNames getTypeNames() const noexcept final
39+
[[nodiscard]] service::TypeNames getTypeNames() const noexcept override
4040
{
4141
return _pimpl->getTypeNames();
4242
}
4343

44-
[[nodiscard]] service::ResolverMap getResolvers() const noexcept final
44+
[[nodiscard]] service::ResolverMap getResolvers() const noexcept override
4545
{
4646
return _pimpl->getResolvers();
4747
}
4848

49-
void beginSelectionSet(const service::SelectionSetParams& params) const final
49+
void beginSelectionSet(const service::SelectionSetParams& params) const override
5050
{
5151
_pimpl->beginSelectionSet(params);
5252
}
5353

54-
void endSelectionSet(const service::SelectionSetParams& params) const final
54+
void endSelectionSet(const service::SelectionSetParams& params) const override
5555
{
5656
_pimpl->endSelectionSet(params);
5757
}
@@ -62,8 +62,8 @@ class [[nodiscard]] Character final
6262

6363
explicit Character(std::unique_ptr<const Concept> pimpl) noexcept;
6464

65-
void beginSelectionSet(const service::SelectionSetParams& params) const final;
66-
void endSelectionSet(const service::SelectionSetParams& params) const final;
65+
void beginSelectionSet(const service::SelectionSetParams& params) const override;
66+
void endSelectionSet(const service::SelectionSetParams& params) const override;
6767

6868
const std::unique_ptr<const Concept> _pimpl;
6969

0 commit comments

Comments
 (0)