1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef META_SRC_ANIMATION_MODIFIER_H
16 #define META_SRC_ANIMATION_MODIFIER_H
17 
18 #include <meta/base/namespace.h>
19 #include <meta/base/types.h>
20 #include <meta/ext/attachment/attachment.h>
21 #include <meta/interface/animation/intf_animation.h>
22 #include <meta/interface/animation/intf_animation_modifier.h>
23 
META_BEGIN_NAMESPACE()24 META_BEGIN_NAMESPACE()
25 
26 template<class FinalClass, const META_NS::ClassInfo& ClassInfo, class... Interfaces>
27 class AnimationModifierFwd
28     : public META_NS::AttachmentFwd<FinalClass, ClassInfo, META_NS::IAnimationModifier, Interfaces...> {
29 public:
30     using Super = META_NS::AttachmentFwd<FinalClass, ClassInfo, META_NS::IAnimationModifier, Interfaces...>;
31 
32 public:
33     bool AttachTo(const META_NS::IAttach::Ptr& target, const META_NS::IObject::Ptr& dataContext) override
34     {
35         return true;
36     }
37     bool DetachFrom(const META_NS::IAttach::Ptr& target) override
38     {
39         return true;
40     }
41 
42 public: // IAnimationModifier
43     bool ProcessOnGetDuration(IAnimationModifier::DurationData& duration) const override
44     {
45         return true;
46     }
47     bool ProcessOnStep(IAnimationModifier::StepData& step) const override
48     {
49         return true;
50     }
51 };
52 
53 META_END_NAMESPACE()
54 
55 #endif // META_SRC_ANIMATION_MODIFIER_H
56