136 lines
3.5 KiB
C++
136 lines
3.5 KiB
C++
/*
|
|
* Copyright (c) 2023 Fancy Code.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
#include "IIpcConfig.h"
|
|
#include "ILog.h"
|
|
working_time::working_time() : mHourFrom(0), mHourTo(0), mMinuteFrom(0), mMinuteTo(0)
|
|
{
|
|
}
|
|
std::shared_ptr<IIpcConfig> &IIpcConfig::GetInstance(std::shared_ptr<IIpcConfig> *impl)
|
|
{
|
|
static auto instance = std::make_shared<IIpcConfig>();
|
|
if (impl) {
|
|
if (instance.use_count() == 1) {
|
|
LogInfo("Instance changed succeed.\n");
|
|
instance = *impl;
|
|
}
|
|
else {
|
|
LogError("Can't changing the instance becase of using by some one.\n");
|
|
}
|
|
}
|
|
return instance;
|
|
}
|
|
const StatusCode IIpcConfig::ConfigFileSave(void)
|
|
{
|
|
return CreateStatusCode(STATUS_CODE_OK);
|
|
}
|
|
const StatusCode IIpcConfig::Init(void)
|
|
{
|
|
return CreateStatusCode(STATUS_CODE_OK);
|
|
}
|
|
const StatusCode IIpcConfig::UnInit(void)
|
|
{
|
|
return CreateStatusCode(STATUS_CODE_OK);
|
|
}
|
|
const int IIpcConfig::GetInt(const IpcConfigKey &key)
|
|
{
|
|
return -1;
|
|
}
|
|
void IIpcConfig::SetInt(const IpcConfigKey &key, const int &value)
|
|
{
|
|
}
|
|
const short IIpcConfig::GetShort(const IpcConfigKey &key)
|
|
{
|
|
return -1;
|
|
}
|
|
void IIpcConfig::SetShort(const IpcConfigKey &key, const short &value)
|
|
{
|
|
}
|
|
const long IIpcConfig::GetLong(const IpcConfigKey &key)
|
|
{
|
|
return -1;
|
|
}
|
|
void IIpcConfig::SetLong(const IpcConfigKey &key, const long &value)
|
|
{
|
|
}
|
|
const long long IIpcConfig::GetLLong(const IpcConfigKey &key)
|
|
{
|
|
return -1;
|
|
}
|
|
void IIpcConfig::SetLLong(const IpcConfigKey &key, const long long &value)
|
|
{
|
|
}
|
|
const char IIpcConfig::GetChar(const IpcConfigKey &key)
|
|
{
|
|
return '\0';
|
|
}
|
|
void IIpcConfig::SetChar(const IpcConfigKey &key, const char &value)
|
|
{
|
|
}
|
|
const float IIpcConfig::GetFloat(const IpcConfigKey &key)
|
|
{
|
|
return -1.0;
|
|
}
|
|
void IIpcConfig::SetFloat(const IpcConfigKey &key, const float &value)
|
|
{
|
|
}
|
|
const double IIpcConfig::GetDouble(const IpcConfigKey &key)
|
|
{
|
|
return -1.0;
|
|
}
|
|
void IIpcConfig::SetDouble(const IpcConfigKey &key, const double &value)
|
|
{
|
|
}
|
|
const long double IIpcConfig::GetLongDouble(const IpcConfigKey &key)
|
|
{
|
|
return -1.0;
|
|
}
|
|
void IIpcConfig::SetLongDouble(const IpcConfigKey &key, const long double &value)
|
|
{
|
|
}
|
|
const bool IIpcConfig::GetBool(const IpcConfigKey &key)
|
|
{
|
|
return true;
|
|
}
|
|
void IIpcConfig::SetBool(const IpcConfigKey &key, const bool &value)
|
|
{
|
|
}
|
|
const std::string IIpcConfig::GetString(const IpcConfigKey &key)
|
|
{
|
|
return "undefine";
|
|
}
|
|
void IIpcConfig::SetString(const IpcConfigKey &key, const std::string &string)
|
|
{
|
|
}
|
|
WorkMode IIpcConfig::GetWorkMode(void)
|
|
{
|
|
return WorkMode::END;
|
|
}
|
|
void IIpcConfig::SetWorkMode(const WorkMode &mode)
|
|
{
|
|
}
|
|
ConfigSwitch IIpcConfig::GetSwitch(const IpcConfigKey &key)
|
|
{
|
|
return ConfigSwitch::END;
|
|
}
|
|
void IIpcConfig::SetSwitch(const IpcConfigKey &key, const ConfigSwitch &value)
|
|
{
|
|
}
|
|
ConfigLevel IIpcConfig::GetLevel(const IpcConfigKey &key)
|
|
{
|
|
return ConfigLevel::END;
|
|
}
|
|
void IIpcConfig::SetLevel(const IpcConfigKey &key, const ConfigLevel &value)
|
|
{
|
|
} |