本文整理汇总了C++中DBObjectLIST::ItemNum方法的典型用法代码示例。如果您正苦于以下问题:C++ DBObjectLIST::ItemNum方法的具体用法?C++ DBObjectLIST::ItemNum怎么用?C++ DBObjectLIST::ItemNum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBObjectLIST
的用法示例。
在下文中一共展示了DBObjectLIST::ItemNum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Configure
CMreturn Configure(bool shrink, bool flat, char *expStr) {
size_t i;
DBInt recID, layerID;
DBFloat floatVal;
DBObject *obj;
DBObjTableField *fieldPTR;
Operand = new DBMathOperand(expStr);
if (Operand->Expand(Variables) == DBFault) return (CMfailed);
CellSize.X = CellSize.Y = DBHugeVal;
for (recID = 0; recID < Variables->ItemNum(); ++recID) {
obj = Variables->Item(recID);
if ((fieldPTR = Table->Field(obj->Name())) != (DBObjTableField *) NULL) continue;
if ((GrdVar = (CMDgrdVariable **) realloc(GrdVar, sizeof(CMDgrdVariable *) * (VarNum + 1))) ==
(CMDgrdVariable **) NULL) {
CMmsgPrint(CMmsgSysError, "Memory Allocation Error in: %s %d", __FILE__, __LINE__);
return (CMfailed);
}
GrdVar[VarNum] = new CMDgrdVariable(obj->Name());
if (GrdVar[VarNum]->Configure(Table, flat) == DBFault) {
for (i = 0; i <= VarNum; ++i) delete GrdVar[i];
free(GrdVar);
return (CMfailed);
}
Extent.Expand(GrdVar[VarNum]->Extent());
floatVal = GrdVar[VarNum]->CellWidth();
if (CellSize.X > floatVal) CellSize.X = floatVal;
floatVal = GrdVar[VarNum]->CellHeight();
if (CellSize.Y > floatVal) CellSize.Y = floatVal;
layerID = (GrdVar[VarNum])->LayerNum();
if (LayerNum < layerID) {
LayerNum = layerID;
MasterVar = VarNum;
}
VarNum++;
}
for (i = 0; i < ExpNum; ++i) if (Expressions[i]->Configure(Table) == DBFault) return (CMfailed);
Operand->Configure(Table->Fields());
if (shrink) for (i = 0; i < VarNum; ++i) Extent.Shrink(GrdVar[i]->Extent());
return (CMsucceeded);
}