本文整理汇总了C++中TextStream::skipLine方法的典型用法代码示例。如果您正苦于以下问题:C++ TextStream::skipLine方法的具体用法?C++ TextStream::skipLine怎么用?C++ TextStream::skipLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextStream
的用法示例。
在下文中一共展示了TextStream::skipLine方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parse
bool Cube::parse(TextStream& textStream)
{
// Header information
textStream.skipLine(2);
int nAtoms(parseGridAxes(textStream));
if (nAtoms == 0) {
QString msg("Incorrect format on line ");
msg += QString::number(textStream.lineNumber());
msg += "\nExpected: <int> <double> <double> <double>";
m_errors.append(msg);
return false;
}
if (!parseCoordinates(textStream, nAtoms)) return false;
parseGridData(textStream);
return m_errors.isEmpty();
}
示例2: esp
QList<Data::SurfaceType> QChemPlot::parseForProperties(TextStream& textStream)
{
QString firstLine;
while (!textStream.atEnd() && !firstLine.contains("Grid point positions")) {
firstLine = textStream.nextLine();
}
bool esp(firstLine.contains("esp values"));
bool rho(firstLine.contains("electronic density values"));
textStream.skipLine();
QString secondLine(textStream.nextLine());
QList<Data::SurfaceType> surfaceTypes;
unsigned count(1);
while (!secondLine.isEmpty()) {
QString field(secondLine.left(13));
secondLine.remove(0, 13);
field = field.trimmed();
if (field == "X" || field == "Y" || field == "Z") {
// ignore
}else if(field.contains("ALPHA")) {
surfaceTypes.append(
Data::SurfaceType(Data::SurfaceType::AlphaOrbital, count++));
}else if(field.contains("BETA")) {
surfaceTypes.append(
Data::SurfaceType(Data::SurfaceType::BetaOrbital, count++));
}else if (esp) {
surfaceTypes.append(
Data::SurfaceType(Data::SurfaceType::ElectrostaticPotential, count++));
}else if (rho) {
surfaceTypes.append(
Data::SurfaceType(Data::SurfaceType::TotalDensity, count++));
}
}
return surfaceTypes;
}