• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 #ifndef SCENE_SRC_COMPONENT_NODE_COMPONENT_H
17 #define SCENE_SRC_COMPONENT_NODE_COMPONENT_H
18 
19 #include <scene/ext/component.h>
20 
21 #include <meta/ext/object.h>
22 
SCENE_BEGIN_NAMESPACE()23 SCENE_BEGIN_NAMESPACE()
24 
25 class IInternalNode : public CORE_NS::IInterface {
26     META_INTERFACE(CORE_NS::IInterface, IInternalNode, "7ce14037-9137-4cbd-877a-8ea8862e9fb2")
27 public:
28     META_PROPERTY(bool, Enabled)
29 };
30 
31 META_REGISTER_CLASS(NodeComponent, "0a222395-21cc-4518-a1ca-0cdca384ba9e", META_NS::ObjectCategoryBits::NO_CATEGORY)
32 
33 class NodeComponent : public META_NS::IntroduceInterfaces<Component, IInternalNode> {
34     META_OBJECT(NodeComponent, ClassId::NodeComponent, IntroduceInterfaces)
35 
36 public:
37     META_BEGIN_STATIC_DATA()
38     SCENE_STATIC_PROPERTY_DATA(IInternalNode, bool, Enabled, "NodeComponent.enabled")
39     META_END_STATIC_DATA()
40 
41     META_IMPLEMENT_PROPERTY(bool, Enabled)
42 
43 public:
44     BASE_NS::string GetName() const override;
45 };
46 
47 SCENE_END_NAMESPACE()
48 
49 #endif