void CConfigInfo::loadDefaultConfigInfo() { BOOST_LOG_FUNCTION(); std::string strParamValue; CConfigInfoHelper* pConfigInfoHelper = NULL; pConfigInfoHelper = new CConfigInfoHelper(m_strConfigFileName); strParamValue = pConfigInfoHelper->getStringParamValue(DEF_VALUE_PARAM_StartTime); if (!strParamValue.empty()) { m_strStartTime = strParamValue; boost::algorithm::trim(m_strStartTime); } if (NULL != pConfigInfoHelper) { delete pConfigInfoHelper; pConfigInfoHelper = NULL; } }
void CConfigInfo::_LoadDefaultConfigInfo() { BOOST_LOG_FUNCTION(); std::string strParamValue; CConfigInfoHelper* pConfigInfoHelper = NULL; pConfigInfoHelper = new CConfigInfoHelper(m_strConfigFileName); strParamValue = pConfigInfoHelper->getStringParamValue(DEF_VALUE_PARAM_HisDataDirectory); if (!strParamValue.empty()) { m_strHistoryDataDirectory = strParamValue; } strParamValue =pConfigInfoHelper->getStringParamValue(DEF_VALUE_PARAM_SaveDataDirectoryBAR); if (!strParamValue.empty()) { m_strSaveDataDirectoryBAR = strParamValue; } strParamValue =pConfigInfoHelper->getStringParamValue(DEF_VALUE_PARAM_SaveDataDirectoryTIK); if (!strParamValue.empty()) { m_strSaveDataDirectoryTIK = strParamValue; } strParamValue =pConfigInfoHelper->getStringParamValue(DEF_VALUE_PARAM_DbType); if (!strParamValue.empty()) { m_strDbType = strParamValue; boost::algorithm::trim(m_strDbType); boost::algorithm::to_upper(m_strDbType); } strParamValue =pConfigInfoHelper->getStringParamValue(DEF_VALUE_PARAM_StartTime); if (!strParamValue.empty()) { m_strStartTime = strParamValue; boost::algorithm::trim(m_strStartTime); } if (NULL != pConfigInfoHelper) { delete pConfigInfoHelper; pConfigInfoHelper = NULL; } }
void CConfigInfo::_LoadConfigFileData() { BOOST_LOG_FUNCTION(); std::string strParamValue; CConfigInfoHelper* pConfigInfoHelper = NULL; pConfigInfoHelper = new CConfigInfoHelper(m_strValue_ConfigFileName); strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_HisDataDirectory); if (!strParamValue.empty()) { m_strValue_HistoryDataDirectory = strParamValue; } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_SaveDataDirectoryBAR); if (!strParamValue.empty()) { m_strValue_SaveDataDirectoryBAR = strParamValue; } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_SaveDataDirectoryTIK); if (!strParamValue.empty()) { m_strValue_SaveDataDirectoryTIK = strParamValue; } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_DbType); if (!strParamValue.empty()) { m_strValue_DbType = strParamValue; boost::algorithm::trim(m_strValue_DbType); boost::algorithm::to_upper(m_strValue_DbType); } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_StartTime); if (!strParamValue.empty()) { m_strValue_StartTime_InFile = strParamValue; boost::algorithm::trim(m_strValue_StartTime_InFile); boost::algorithm::to_upper(m_strValue_StartTime_InFile); } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_LoadMaxFilesSize); if (!strParamValue.empty()) { m_strValue_LoadMaxFilesSize = strParamValue; boost::algorithm::trim(m_strValue_LoadMaxFilesSize); boost::algorithm::to_upper(m_strValue_LoadMaxFilesSize); } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_AutoRun); if (!strParamValue.empty()) { m_strValue_AutoRun = strParamValue; boost::algorithm::trim(m_strValue_AutoRun); boost::algorithm::to_upper(m_strValue_AutoRun); } strParamValue = pConfigInfoHelper->getStringParamValue(DEF_PARAM_KEY_AutoRunTime); if (!strParamValue.empty()) { m_strValue_AutoRunTime = strParamValue; boost::algorithm::trim(m_strValue_AutoRunTime); boost::algorithm::to_upper(m_strValue_AutoRunTime); } if (NULL != pConfigInfoHelper) { delete pConfigInfoHelper; pConfigInfoHelper = NULL; } }