本文整理汇总了C++中CStringArray::end方法的典型用法代码示例。如果您正苦于以下问题:C++ CStringArray::end方法的具体用法?C++ CStringArray::end怎么用?C++ CStringArray::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStringArray
的用法示例。
在下文中一共展示了CStringArray::end方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAxisX
//----------------------------------------
void CPlot::GetAxisX(CInternalFiles* yfx,
ExpressionValueDimensions* dimVal,
CExpressionValue* varX,
string* varXName)
{
if (!m_forcedVarXName.empty())
{
if (varXName != NULL)
{
*varXName = m_forcedVarXName.c_str();
}
GetForcedAxisX(yfx, dimVal, varX);
return;
}
CStringArray axisNames;
CStringArray::iterator is;
//ExpressionValueDimensions dimVal;
yfx->GetAxisVars(axisNames);
if (axisNames.size() != 1)
{
string msg = CTools::Format("CPlot::GetAxisX - wrong number of axis in file '%s' : %ld"
"Correct number is 1",
yfx->GetName().c_str(),
(long)axisNames.size());
CException e(msg, BRATHL_INCONSISTENCY_ERROR);
CTrace::Tracer("%s", e.what());
throw (e);
}
for (is = axisNames.begin(); is != axisNames.end(); is++)
{
// Get dim
if (dimVal != NULL)
{
yfx->GetVarDims(*is, *dimVal);
if ( (dimVal->size() <= 0) || (dimVal->size() > 2) )
{
string msg = CTools::Format("CPlot::GetAxisX - '%s' axis -> number of dimensions must be 1 or 2 - Found : %ld",
(*is).c_str(), (long)dimVal->size());
CException e(msg, BRATHL_INCONSISTENCY_ERROR);
CTrace::Tracer("%s", e.what());
throw (e);
}
}
// Get values
if (varX != NULL)
{
/*
string wantedUnit;
NetCDFVarKind varKind = yfx->GetVarKind(*is);
if (varKind == Longitude)
{
wantedUnit = CLatLonPoint::m_DEFAULT_UNIT_LONGITUDE;
}
else if (varKind == Latitude)
{
wantedUnit = CLatLonPoint::m_DEFAULT_UNIT_LATITUDE;
}
else
{
CUnit unitX = yfx->GetUnit(*varXName);
wantedUnit = unitX.GetText();
}
yfx->ReadVar(*is, *varX, wantedUnit);
*/
yfx->ReadVar(*is, *varX, yfx->GetUnit(*is).GetText());
}
// Get name
if (varXName != NULL)
{
*varXName = (*is);
}
}
}