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 #include <scene_plugin/api/material_uid.h> 16 #include <scene_plugin/interface/intf_proxy_object.h> 17 18 #include <meta/ext/object.h> 19 20 #include "intf_proxy_object_holder.h" 21 22 namespace { 23 class PropertyHolderImpl : public META_NS::ObjectFwd<PropertyHolderImpl, SCENE_NS::ClassId::CustomPropertiesHolder, 24 META_NS::ClassId::Object, SCENE_NS::IProxyObject, SCENE_NS::IProxyObjectHolder> { 25 public: // IProxyObject ListBoundProperties() const26 BASE_NS::vector<PropertyPair> ListBoundProperties() const override 27 { 28 return holder_.GetBoundProperties(); 29 } 30 31 public: // IProxyObjectHolder Holder()32 PropertyHandlerArrayHolder& Holder() override 33 { 34 return holder_; 35 } 36 37 PropertyHandlerArrayHolder holder_; 38 }; 39 } // namespace SCENE_BEGIN_NAMESPACE()40SCENE_BEGIN_NAMESPACE() 41 void RegisterPropertyHolderImpl() 42 { 43 META_NS::GetObjectRegistry().RegisterObjectType<PropertyHolderImpl>(); 44 } UnregisterPropertyHolderImpl()45void UnregisterPropertyHolderImpl() 46 { 47 META_NS::GetObjectRegistry().UnregisterObjectType<PropertyHolderImpl>(); 48 } 49 50 SCENE_END_NAMESPACE() 51