本文整理匯總了C++中DBNetworkIF::ColNum方法的典型用法代碼示例。如果您正苦於以下問題:C++ DBNetworkIF::ColNum方法的具體用法?C++ DBNetworkIF::ColNum怎麽用?C++ DBNetworkIF::ColNum使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBNetworkIF
的用法示例。
在下文中一共展示了DBNetworkIF::ColNum方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: RecalcExtent
void DBObjData::RecalcExtent() {
DBRegion extent;
switch (Type()) {
case DBTypeVectorPoint:
case DBTypeVectorLine:
case DBTypeVectorPolygon: {
DBVectorIF *vectorIF = new DBVectorIF(this);
DBInt recordID;
for (recordID = 0; recordID < vectorIF->ItemNum(); ++recordID)
extent.Expand(Extent(vectorIF->Item(recordID)));
delete vectorIF;
}
break;
case DBTypeGridDiscrete:
case DBTypeGridContinuous: {
DBGridIF *gridIF = new DBGridIF(this);
extent.LowerLeft = Extent().LowerLeft;
extent.UpperRight.X = extent.LowerLeft.X + gridIF->ColNum() * gridIF->CellWidth();
extent.UpperRight.Y = extent.LowerLeft.Y + gridIF->RowNum() * gridIF->CellHeight();
delete gridIF;
}
break;
case DBTypeNetwork: {
DBNetworkIF *netIF = new DBNetworkIF(this);
extent.LowerLeft = Extent().LowerLeft;
extent.UpperRight.X = extent.LowerLeft.X + netIF->ColNum() * netIF->CellWidth();
extent.UpperRight.Y = extent.LowerLeft.Y + netIF->RowNum() * netIF->CellHeight();
delete netIF;
}
break;
case DBTypeTable:
default:
return;
}
Extent(extent);
}