Added new projects of new RPC core: MyClient and MtServivce

This commit is contained in:
Viacheslav Demydiuk
2024-01-04 18:35:15 +02:00
parent 2a13699900
commit feb0192b11
24 changed files with 2078 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#pragma once
#include "LogLevel.h"
#include <type_traits>
#include <string>
enum class OutputType : int
{
Console = 0x1,
File = 0x2
};
inline OutputType operator|(OutputType lhs, OutputType rhs)
{
using T = std::underlying_type_t<OutputType>;
return static_cast<OutputType>(static_cast<T>(lhs) | static_cast<T>(rhs));
}
inline OutputType& operator|=(OutputType& lhs, OutputType rhs)
{
lhs = lhs | rhs;
return lhs;
}
inline OutputType operator&(OutputType lhs, OutputType rhs)
{
using T = std::underlying_type_t<OutputType>;
return static_cast<OutputType>(static_cast<T>(lhs) & static_cast<T>(rhs));
}
class LogConfigurator
{
public:
static void Setup(LogLevel level, OutputType output_type,
const std::string& profile_name);
};