本文整理汇总了C++中NFCDataList::StringValEx方法的典型用法代码示例。如果您正苦于以下问题:C++ NFCDataList::StringValEx方法的具体用法?C++ NFCDataList::StringValEx怎么用?C++ NFCDataList::StringValEx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NFCDataList
的用法示例。
在下文中一共展示了NFCDataList::StringValEx方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnObjectRecordEvent
int NFCPropertyTrailModule::OnObjectRecordEvent(const NFGUID& self, const RECORD_EVENT_DATA& xEventData, const NFIDataList::TData& oldVar, const NFIDataList::TData& newVar)
{
std::ostringstream stream;
NF_SHARE_PTR<NFIRecord> xRecord = m_pKernelModule->FindRecord(self, xEventData.strRecordName);
if (nullptr == xRecord)
{
return 0;
}
switch (xEventData.nOpType)
{
case NFIRecord::RecordOptype::Add:
{
NFCDataList xDataList;
bool bRet = xRecord->QueryRow(xEventData.nRow, xDataList);
if (bRet)
{
stream << " Trail Add Row[" << xEventData.nRow << "]";
for (int j = 0; j < xDataList.GetCount(); ++j)
{
stream << " [" << j << "] " << xDataList.StringValEx(j);
}
m_pLogModule->LogRecord(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, xRecord->GetName(), stream.str(), __FUNCTION__, __LINE__);
}
}
break;
case NFIRecord::RecordOptype::Del:
{
stream << " Trail Del Row[" << xEventData.nRow << "]";
m_pLogModule->LogRecord(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, xRecord->GetName(), stream.str(), __FUNCTION__, __LINE__);
}
break;
case NFIRecord::RecordOptype::Swap:
{
stream << " Trail Swap Row[" << xEventData.nRow << "] Row[" << xEventData.nCol << "]";
m_pLogModule->LogRecord(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, xRecord->GetName(), stream.str(), __FUNCTION__, __LINE__);
}
break;
case NFIRecord::RecordOptype::Create:
break;
case NFIRecord::RecordOptype::Update:
{
stream << " Trail UpData Row[" << xEventData.nRow << "] Col[" << xEventData.nCol << "]";
stream << " [Old] " << oldVar.StringValEx();
stream << " [New] " << newVar.StringValEx();
m_pLogModule->LogRecord(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, xRecord->GetName(), stream.str(), __FUNCTION__, __LINE__);
}
break;
case NFIRecord::RecordOptype::Cleared:
break;
case NFIRecord::RecordOptype::Sort:
break;
default:
break;
}
return 0;
}
示例2: LogObjectData
int NFCPropertyTrailModule::LogObjectData(const NFGUID& self)
{
NF_SHARE_PTR<NFIObject> xObject = m_pKernelModule->GetObject(self);
if (nullptr == xObject)
{
return -1;
}
NF_SHARE_PTR<NFIPropertyManager> xPropertyManager = xObject->GetPropertyManager();
if (nullptr != xPropertyManager)
{
NF_SHARE_PTR<NFIProperty> xProperty = xPropertyManager->First();
while (nullptr != xProperty)
{
std::ostringstream stream;
stream << " Start trail ";
stream << xProperty->ToString();
m_pLogModule->LogProperty(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, xProperty->GetKey(), stream.str(), __FUNCTION__, __LINE__);
xProperty = xPropertyManager->Next();
}
}
NF_SHARE_PTR<NFIRecordManager> xRecordManager = xObject->GetRecordManager();
if (nullptr != xRecordManager)
{
NF_SHARE_PTR<NFIRecord> xRecord = xRecordManager->First();
while (nullptr != xRecord)
{
for (int i = 0; i < xRecord->GetRows(); ++i)
{
NFCDataList xDataList;
bool bRet = xRecord->QueryRow(i, xDataList);
if (bRet)
{
std::ostringstream stream;
stream << " Start trail Row[" << i << "]";
for (int j = 0; j < xDataList.GetCount(); ++j)
{
stream << " [" << j << "] " << xDataList.StringValEx(j);
}
m_pLogModule->LogRecord(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, xRecord->GetName(), stream.str(), __FUNCTION__, __LINE__);
}
}
xRecord = xRecordManager->Next();
}
}
return 0;
}