• 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_LAYER_COMPONENT_H
17 #define SCENE_SRC_COMPONENT_LAYER_COMPONENT_H
18 
19 #include <scene/ext/component.h>
20 #include <scene/interface/intf_layer.h>
21 
22 #include <meta/ext/object.h>
23 
24 SCENE_BEGIN_NAMESPACE()
25 
26 META_REGISTER_CLASS(LayerComponent, "87a0e450-94d8-4bd2-bc33-c37d8772d819", META_NS::ObjectCategoryBits::NO_CATEGORY)
27 
28 class LayerComponent : public META_NS::IntroduceInterfaces<Component, ILayer> {
29     META_OBJECT(LayerComponent, ClassId::LayerComponent, IntroduceInterfaces)
30 
31 public:
32     META_BEGIN_STATIC_DATA()
33     SCENE_STATIC_PROPERTY_DATA(ILayer, uint64_t, LayerMask, "LayerComponent.layerMask")
34     META_END_STATIC_DATA()
35 
36     META_IMPLEMENT_PROPERTY(uint64_t, LayerMask)
37 
38 public:
39     BASE_NS::string GetName() const override;
40 };
41 
42 SCENE_END_NAMESPACE()
43 
44 #endif
45