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 META_ENGINE_INTERFACE_ENGINE_INPUT_PROPERTY_MANAGER_H 17 #define META_ENGINE_INTERFACE_ENGINE_INPUT_PROPERTY_MANAGER_H 18 19 #include <meta/interface/engine/intf_engine_value_manager.h> 20 #include <meta/interface/property/property.h> 21 22 META_BEGIN_NAMESPACE() 23 24 META_REGISTER_INTERFACE(IEngineInputPropertyManager, "db3adbf0-4caf-4b7b-8850-ee1f0936beab") 25 26 class IEngineInputPropertyManager : public CORE_NS::IInterface { 27 META_INTERFACE(CORE_NS::IInterface, IEngineInputPropertyManager) 28 public: 29 virtual bool Sync() = 0; 30 31 virtual IProperty::Ptr ConstructProperty(BASE_NS::string_view name) = 0; 32 virtual IProperty::Ptr TieProperty(const IProperty::Ptr&, BASE_NS::string valueName) = 0; 33 virtual BASE_NS::vector<IProperty::Ptr> GetAllProperties() const = 0; 34 virtual bool PopulateProperties(IMetadata&) = 0; 35 virtual void RemoveProperty(BASE_NS::string_view name) = 0; 36 37 virtual IEngineValueManager::Ptr GetValueManager() const = 0; 38 39 template<typename Type> ConstructProperty(BASE_NS::string_view name)40 Property<Type> ConstructProperty(BASE_NS::string_view name) 41 { 42 return Property<Type>(ConstructProperty(name)); 43 } 44 }; 45 46 META_INTERFACE_TYPE(IEngineInputPropertyManager); 47 META_END_NAMESPACE() 48 49 #endif 50