本文整理汇总了C++中Zone::head方法的典型用法代码示例。如果您正苦于以下问题:C++ Zone::head方法的具体用法?C++ Zone::head怎么用?C++ Zone::head使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone
的用法示例。
在下文中一共展示了Zone::head方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDimension
/** It returns the pointer to the new object that is created. After
reading which type of dimension this is, it reads the initial zone
boundary, followed by a list of pairs: number of intervals in the
zone and the zone boundary. */
Dimension* Dimension::getDimension(istream& input)
{
char token[64];
int dimType;
double zoneBound;
input >> token;
switch(tolower(token[0]))
{
case 'x':
dimType = DIM_X;
break;
case 'y':
dimType = DIM_Y;
break;
case 'z':
dimType = DIM_Z;
break;
case 'r':
dimType = DIM_R;
break;
case 't':
dimType = DIM_THETA;
break;
case 'p':
dimType = DIM_PHI;
break;
default:
error(130,"Invalid dimension type: %s",token);
}
next = new Dimension(dimType);
memCheck(next,"Dimension::getDimension(...): next");
Dimension *dimPtr = next;
/* read first zone boundary */
input >> dimPtr->start;
/* read list of zone definitions until keyword "end" */
Zone* zoneList = dimPtr->zoneListHead;
verbose(2,"Reading zone boundaries for Dimension %s:",token);
verbose(3,"Start: %g",dimPtr->start);
clearComment(input);
input >> token;
while (strcmp(token,"end"))
{
input >> zoneBound;
zoneList = zoneList->addZone(atoi(token),zoneBound);
clearComment(input);
input >> token;
}
if (zoneList->head())
warning(131,"Dimension has no boundaries");
return dimPtr;
}