本文整理汇总了C++中ITabFile::SetErrorLog方法的典型用法代码示例。如果您正苦于以下问题:C++ ITabFile::SetErrorLog方法的具体用法?C++ ITabFile::SetErrorLog怎么用?C++ ITabFile::SetErrorLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITabFile
的用法示例。
在下文中一共展示了ITabFile::SetErrorLog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadBuff
BOOL KBuffManager::LoadBuff(const char* szTabFile)
{
BOOL bResult = false;
BOOL bRetCode = false;
ITabFile* piTabFile = NULL;
KBuff* pBuff = NULL;
DWORD dwBuffID = ERROR_ID;
KAttribData AttribData;
pair<KBUFF_INFO_MAP::iterator, bool> InsRet;
int nTabData = 0;
char szFilePath[MAX_PATH];
snprintf(szFilePath, sizeof(szFilePath), "%s/%s", SETTING_DIR, BUFF_LIST_FILE_NAME);
szFilePath[sizeof(szFilePath) - 1] = '\0';
piTabFile = g_OpenTabFile(szFilePath);
KGLOG_PROCESS_ERROR(piTabFile);
piTabFile->SetErrorLog(false);
for (int nRowIndex = 2; nRowIndex <= piTabFile->GetHeight(); nRowIndex++)
{
InsRet = m_mapBuff.insert(std::make_pair(++dwBuffID, KBuff()));
KGLOG_PROCESS_ERROR(InsRet.second);
pBuff = &(InsRet.first->second);
bRetCode = piTabFile->GetInteger(nRowIndex, "ID", 0, &nTabData);
pBuff->m_dwID = (DWORD)nTabData;
KGLOG_PROCESS_ERROR(pBuff->m_dwID > 0);
bRetCode = piTabFile->GetInteger(nRowIndex, "Frame", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_nFrame = nTabData;
bRetCode = piTabFile->GetInteger(nRowIndex, "TimeLapseOffline", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_bTimeLapseOffline = nTabData;
bRetCode = piTabFile->GetInteger(nRowIndex, "DelOnFloor", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_bDelOnFloor = nTabData;
bRetCode = piTabFile->GetInteger(nRowIndex, "DelOnObjNoAttached", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_bDelOnObjNoAttached = nTabData;
bRetCode = piTabFile->GetInteger(nRowIndex, "ActiveCount", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_nActiveCount = nTabData;
bRetCode = piTabFile->GetInteger(nRowIndex, "NeedSave", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_bNeedSave = nTabData;
bRetCode = piTabFile->GetInteger(nRowIndex, "Share", 0, &nTabData);
KGLOG_PROCESS_ERROR(bRetCode);
pBuff->m_bShare = nTabData;
for (int i = 1; i <= 8; i++)
{
bRetCode = LoadAttribute(piTabFile, nRowIndex, "Attribute", i, &AttribData);
KGLOG_PROCESS_ERROR(bRetCode);
if (AttribData.nKey != atInvalid)
{
APPEND_ATTRIB(pBuff->m_pRollBackAttr, AttribData);
}
}
for (int i = 1; i <= 4; i++)
{
bRetCode = LoadAttribute(piTabFile, nRowIndex, "ActiveAttr", i, &AttribData);
KGLOG_PROCESS_ERROR(bRetCode);
if (AttribData.nKey != atInvalid)
{
APPEND_ATTRIB(pBuff->m_pActiveAttr, AttribData);
}
}
}
bResult = true;
Exit0:
KG_COM_RELEASE(piTabFile);
if (!bResult)
{
KBUFF_INFO_MAP::iterator it = m_mapBuff.begin();
for (;it != m_mapBuff.end(); ++it)
{
it->second.UnInit();
}
m_mapBuff.clear();
}
return bResult;
}