• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright (C) 2025 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 #ifndef _ADLT_TEST_CDTORS_B_H_
16 #define _ADLT_TEST_CDTORS_B_H_
17 
18 namespace libb {
19 
20 enum Flags {
21     INIT_0 = 0,
22     INIT_1 = 1,
23     INIT_2 = 2,
24     INIT_3 = 3,
25     FINI_0 = 4,
26     FINI_1 = 5,
27     FINI_2 = 6,
28     FINI_3 = 7,
29 };
30 
31 class ClassB {
32 public:
33     explicit ClassB(unsigned value);
34     ~ClassB();
35 
36     static ClassB& Instance();
37     void Log(const char* message="") const;
38 
39     unsigned Value() const;
40     void SetFlag(unsigned bit);
41     bool HasFlag(unsigned bit) const;
42 
43 private:
44     int object_id;
45     unsigned value = 0;
46 };
47 
48 extern "C" const ClassB
49         class_b_instance_0,
50         class_b_instance_1,
51         class_b_instance_2;
52 
53 } // namespace libb
54 #endif