hunting/utils/Log/src/ILogMakePtr.h
2023-09-08 22:44:13 -07:00

25 lines
707 B
C++

#ifndef ILOG_MAKE_PTR_H
#define ILOG_MAKE_PTR_H
#include "ILogCpp.h"
#include "ILog.h"
#include <iostream>
#include <memory>
class ILogMakePtr
{
public:
static std::shared_ptr<ILogMakePtr> &GetInstance(std::shared_ptr<ILogMakePtr> *impl = nullptr)
{
static std::shared_ptr<ILogMakePtr> instance = std::make_shared<ILogMakePtr>();
if (impl)
{
instance = *impl;
}
return instance;
}
ILogMakePtr() = default;
virtual ~ILogMakePtr() = default;
virtual std::shared_ptr<ILogCpp> MakeLogImplPtr(void);
virtual std::shared_ptr<ILogCpp> MakeLogEasylogging(const LogSetting *setting);
virtual void CreateLogPtr(ILog **log);
};
#endif