本文整理汇总了C++中TIStream::eos方法的典型用法代码示例。如果您正苦于以下问题:C++ TIStream::eos方法的具体用法?C++ TIStream::eos怎么用?C++ TIStream::eos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TIStream
的用法示例。
在下文中一共展示了TIStream::eos方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadData
void TStageObjectSpline::loadData(TIStream &is) {
std::vector<TThickPoint> points;
VersionNumber tnzVersion = is.getVersion();
if (tnzVersion < VersionNumber(1, 16)) {
while (!is.eos()) {
TThickPoint p;
is >> p.x >> p.y >> p.thick;
points.push_back(p);
}
} else {
示例2: loadFolder
void TLevelSet::loadFolder(TIStream &is, TFilePath folder) {
std::string s;
is.getTagParam("type", s);
if (s == "default") setDefaultFolder(folder);
while (!is.eos()) {
std::string tagName;
is.matchTag(tagName);
if (tagName == "levels") {
while (!is.eos()) {
TPersist *p = 0;
is >> p;
TXshLevel *xshLevel = dynamic_cast<TXshLevel *>(p);
if (xshLevel && !xshLevel->getChildLevel())
moveLevelToFolder(folder, xshLevel);
}
} else if (tagName == "folder") {
is.getTagParam("name", s);
TFilePath child = createFolder(folder, ::to_wstring(s));
loadFolder(is, child);
} else
throw TException("expected <levels> or <folder>");
is.closeChild();
}
示例3: loadData
void TIntParam::loadData(TIStream &is)
{
int def, value;
is >> def;
if (is.eos()) {
def += 1;
setDefaultValue(def);
setValue(def, false);
return;
}
setDefaultValue(def);
is >> value;
setValue(value, false);
}
示例4: loadData
void TXsheet::loadData(TIStream &is) {
clearAll();
TStageObjectId cameraId = TStageObjectId::CameraId(0);
TStageObject *firstCamera = getStageObject(cameraId);
m_imp->m_pegTree->removeStageObject(cameraId);
int col = 0;
string tagName;
while (is.openChild(tagName)) {
if (tagName == "columns") {
while (!is.eos()) {
TPersist *p = 0;
is >> p;
TXshColumn *column = dynamic_cast<TXshColumn *>(p);
if (!column) throw TException("expected xsheet column");
m_imp->m_columnSet.insertColumn(col++, column);
column->setXsheet(this);
if (TXshZeraryFxColumn *zc =
dynamic_cast<TXshZeraryFxColumn *>(column)) {
TFx *fx = zc->getZeraryColumnFx()->getZeraryFx();
int fxTypeCount = m_imp->m_fxDag->getFxTypeCount(fx);
int maxFxTypeId = std::max(fxTypeCount, fx->getAttributes()->getId());
m_imp->m_fxDag->updateFxTypeTable(fx, maxFxTypeId);
m_imp->m_fxDag->updateFxIdTable(fx);
for (int j = 0; j < fx->getParams()->getParamCount(); j++) {
TParam *param = fx->getParams()->getParam(j);
if (TDoubleParam *dp = dynamic_cast<TDoubleParam *>(param))
getStageObjectTree()->setGrammar(dp);
else if (dynamic_cast<TPointParam *>(param) ||
dynamic_cast<TRangeParam *>(param) ||
dynamic_cast<TPixelParam *>(param)) {
TParamSet *paramSet = dynamic_cast<TParamSet *>(param);
assert(paramSet);
int f;
for (f = 0; f < paramSet->getParamCount(); f++) {
TDoubleParam *dp = dynamic_cast<TDoubleParam *>(
paramSet->getParam(f).getPointer());
if (!dp) continue;
getStageObjectTree()->setGrammar(dp);
}
}
}
}
}
} else if (tagName == "pegbars") {
TPersist *p = m_imp->m_pegTree;
is >> *p;
} else if (tagName == "fxnodes") {