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_BENCHMARK_UTILS_HEADER 17 #define META_BENCHMARK_UTILS_HEADER 18 19 #include <meta/base/namespace.h> 20 #include <meta/interface/intf_object_registry.h> 21 #include <meta/interface/object_macros.h> 22 23 META_BEGIN_NAMESPACE() 24 25 META_REGISTER_INTERFACE(IBenchmarkType, "570fda7f-3481-48c8-8839-67738e85f8c9") 26 META_REGISTER_CLASS(BenchmarkType, "839ddde1-2790-4493-a3c4-7fa49edcbfe4", ObjectCategoryBits::NO_CATEGORY) 27 28 namespace benchmarks { 29 30 class IBenchmarkType : public CORE_NS::IInterface { 31 META_INTERFACE(CORE_NS::IInterface, IBenchmarkType) 32 }; 33 34 enum BenchmarkEnum : uint32_t { BenchmarkEnumA = 1, BenchmarkEnumB = 2 }; 35 36 void RegisterBenchmarkTypes(); 37 void UnregisterBenchmarkTypes(); 38 39 IBenchmarkType::Ptr CreateBenchmarkType(); 40 41 } // namespace benchmarks 42 META_END_NAMESPACE() 43 44 META_TYPE(META_NS::benchmarks::IBenchmarkType::Ptr) 45 META_TYPE(META_NS::benchmarks::IBenchmarkType::WeakPtr) 46 META_TYPE(META_NS::benchmarks::BenchmarkEnum) 47 48 #endif 49