mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
18 lines
642 B
C++
18 lines
642 B
C++
#ifndef HALMAKEPTR_H
|
|
#define HALMAKEPTR_H
|
|
#include "IHal.h"
|
|
#include "IHalCpp.h"
|
|
#include "StatusCode.h"
|
|
#include <memory>
|
|
class HalMakePtr
|
|
{
|
|
public:
|
|
HalMakePtr() = default;
|
|
virtual ~HalMakePtr() = default;
|
|
static std::shared_ptr<HalMakePtr> &GetInstance(std::shared_ptr<HalMakePtr> *impl = nullptr);
|
|
virtual StatusCode Init() { return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); }
|
|
virtual StatusCode UnInit() { return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); }
|
|
virtual StatusCode CreateHalPtr(IHal **hal);
|
|
virtual StatusCode CreateHalSharePtr(std::shared_ptr<IHalCpp> &impl);
|
|
};
|
|
#endif |