• 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_ASSET_ASSET_OBJECT_H
17 #define SCENE_SRC_ASSET_ASSET_OBJECT_H
18 
19 #include <ecs_serializer/intf_ecs_asset_manager.h>
20 #include <scene/interface/intf_scene.h>
21 
22 #include <meta/ext/object.h>
23 
24 
SCENE_BEGIN_NAMESPACE()25 SCENE_BEGIN_NAMESPACE()
26 
27 class IAssetObject : public CORE_NS::IInterface {
28     META_INTERFACE(CORE_NS::IInterface, IAssetObject, "70c77b11-bd85-490a-880f-d8a80d2addb0")
29 public:
30     virtual bool Load(const IScene::Ptr&, BASE_NS::string_view uri) = 0;
31 
32 };
33 
34 META_REGISTER_CLASS(AssetObject, "a8b4c9e9-9c28-49b7-85b2-2eb6ac812b7c", META_NS::ObjectCategoryBits::NO_CATEGORY)
35 
36 class AssetObject : public META_NS::IntroduceInterfaces<META_NS::MetaObject, IAssetObject> {
37     META_OBJECT(AssetObject, SCENE_NS::ClassId::AssetObject, IntroduceInterfaces)
38 
39 public:
40     bool Load(const IScene::Ptr&, BASE_NS::string_view uri) override;
41 
42 private:
43     ECS_SERIALIZER_NS::IEntityCollection::Ptr entities_;
44 };
45 
46 SCENE_END_NAMESPACE()
47 
48 #endif
49