• 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 
17 #include "utils.h"
18 
19 #include <meta/ext/object_fwd.h>
20 #include <meta/interface/interface_macros.h>
21 
22 META_BEGIN_NAMESPACE()
23 namespace benchmarks {
24 namespace {
25 
26 class BenchmarkType : public IntroduceInterfaces<ObjectFwd, IBenchmarkType> {
27     META_OBJECT(BenchmarkType, ClassId::BenchmarkType, IntroduceInterfaces)
28 };
29 
30 } // namespace
31 
RegisterBenchmarkTypes()32 void RegisterBenchmarkTypes()
33 {
34     META_NS::RegisterObjectType<BenchmarkType>();
35 
36     //    RegisterPropertyType<IBenchmarkType>();
37     //    RegisterPropertyType<BenchmarkEnum>();
38 }
39 
UnregisterBenchmarkTypes()40 void UnregisterBenchmarkTypes()
41 {
42     //    UnRegisterPropertyType<BenchmarkEnum>();
43     //    UnRegisterPropertyType<IBenchmarkType>();
44 
45     META_NS::UnregisterObjectType<BenchmarkType>();
46 }
47 
CreateBenchmarkType()48 IBenchmarkType::Ptr CreateBenchmarkType()
49 {
50     return META_NS::GetObjectRegistry().Create<IBenchmarkType>(ClassId::BenchmarkType);
51 }
52 
53 } // namespace benchmarks
54 META_END_NAMESPACE()
55