Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #ifndef CCU_RES_PACK_H
11 : #define CCU_RES_PACK_H
12 :
13 : #include "ccu_types.h"
14 : #include "ccu_device_pub.h"
15 :
16 : namespace hcomm {
17 :
18 : class CcuResPack{
19 : public:
20 567 : explicit CcuResPack(CcuInstanceType insType) : insType_(insType) {};
21 : ~CcuResPack();
22 :
23 : CcuResult Init();
24 : CcuResult Reset();
25 :
26 : CcuResRepository &GetCcuResRepo();
27 :
28 : private:
29 : CcuResPack(const CcuResPack &that) = delete;
30 : CcuResPack &operator=(const CcuResPack &that) = delete;
31 : CcuResPack(CcuResPack &&that) = delete;
32 : CcuResPack &operator=(CcuResPack &&that) = delete;
33 :
34 : int32_t devLogicId_{0};
35 : CcuInstanceType insType_{CcuInstanceType::CCU_UNUSED};
36 : CcuResHandle resHandle_{nullptr};
37 : CcuResRepository resRepo_{};
38 : };
39 :
40 : } // namespace hcomm
41 :
42 : # endif // CCU_RES_PACK_H
|