本文整理汇总了C++中NFIDataList::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ NFIDataList::Add方法的具体用法?C++ NFIDataList::Add怎么用?C++ NFIDataList::Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NFIDataList
的用法示例。
在下文中一共展示了NFIDataList::Add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QueryRow
// 获得数据
bool NFCRecord::QueryRow(const int nRow, NFIDataList& varList)
{
if (!ValidRow(nRow))
{
return false;
}
if (!IsUsed(nRow))
{
return false;
}
varList.Clear();
for (int i = 0; i < GetCols(); ++i)
{
NF_SHARE_PTR<NFIDataList::TData> pVar = mtRecordVec.at(GetPos(nRow, i));
if (pVar.get())
{
varList.Append(*pVar);
}
else
{
switch (GetColType(i))
{
case TDATA_INT:
varList.Add(NFINT64(0));
break;
case TDATA_FLOAT:
varList.Add(0.0f);
break;
case TDATA_STRING:
varList.Add(NULL_STR.c_str());
break;
case TDATA_OBJECT:
varList.Add(NFGUID());
break;
default:
return false;
break;
}
}
}
if (varList.GetCount() != GetCols())
{
return false;
}
return true;
}
示例2: GetAroundObject
const int NFCGridModule::GetAroundObject(NFCSceneGridInfo* pGridInfo, NFIDataList& objectList, EGRID_AROUND eAround /*= EGRID_AROUND_9 */)
{
if (!pGridInfo)
{
return 0;
}
NFCDataList gridList;
if (GetAroundGrid(pGridInfo, gridList, eAround) > 0)
{
for (int i = 0; i < gridList.GetCount(); i++)
{
NFCSceneGridInfo* pGridInfo = (NFCSceneGridInfo*)(gridList.Pointer(i));
if (pGridInfo)
{
NFIDENTID ident;
bool bRet = pGridInfo->First(ident);
while (bRet)
{
objectList.Add(ident);
bRet = pGridInfo->Next(ident);
}
}
}
}
return objectList.GetCount();
}
示例3: GetAroundGrid
const int NFCGridModule::GetAroundGrid(NFCSceneGridInfo* pGridInfo, NFIDataList& gridList, EGRID_AROUND eAround /*= EGRID_AROUND_9 */)
{
int nObjectCount = 0;
if (!pGridInfo)
{
return nObjectCount;
}
gridList.Add(pGridInfo);
nObjectCount += pGridInfo->Count();
switch (eAround)
{
case EGRID_AROUND_9:
{
for (int i = 0; i < EGRID_DIRECTION_MAXCOUNT; i++)
{
NFCSceneGridInfo* pInfo = pGridInfo->GetConnectGrid((EGRID_DIRECTION)i);
if (pInfo)
{
gridList.Add(pInfo);
//gridList.push_back( pInfo );
nObjectCount += pInfo->Count();
}
}
}
break;
case EGRID_AROUND_16:
break;
case EGRID_AROUND_25:
break;
case EGRID_AROUND_ALL:
break;
default:
break;
}
return nObjectCount;
}