本文整理汇总了C++中TIStream::openChild方法的典型用法代码示例。如果您正苦于以下问题:C++ TIStream::openChild方法的具体用法?C++ TIStream::openChild怎么用?C++ TIStream::openChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TIStream
的用法示例。
在下文中一共展示了TIStream::openChild方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadData
void TMacroFx::loadData(TIStream &is)
{
VersionNumber tnzVersion = is.getVersion();
string tagName;
while (is.openChild(tagName)) {
if (tagName == "root") {
TPersist *p = 0;
is >> p;
m_root = dynamic_cast<TFx *>(p);
} else if (tagName == "nodes") {
示例2: loadData
void TXshSoundTextColumn::loadData(TIStream &is)
{
string tagName;
while (is.openChild(tagName)) {
if (tagName == "cells") {
while (is.openChild(tagName)) {
if (tagName == "cell") {
TPersist *p = 0;
int row = 1;
int fidNumber = 1;
TFilePath path;
is >> row >> fidNumber >> p;
TXshLevel *xshLevel = dynamic_cast<TXshLevel *>(p);
TXshCell cell(xshLevel, TFrameId(fidNumber));
setCell(row, cell);
} else
throw TException("TXshLevelColumn, unknown tag(2): " + tagName);
is.closeChild();
}
} else
示例3: loadData
void ColumnLevel::loadData(TIStream &is)
{
std::string tagName;
is.openChild(tagName);
if (tagName == "SoundCells") {
TPersist *p = 0;
is >> m_startOffset >> m_endOffset >> m_startFrame >> p;
TXshSoundLevel *xshLevel = dynamic_cast<TXshSoundLevel *>(p);
if (xshLevel)
m_soundLevel = xshLevel;
}
示例4: loadData
void TToneCurveParam::loadData(TIStream &is) {
std::string tagName;
is.openChild(tagName);
assert(tagName == "tonecurve");
m_rgbaParamSet->removeAllParam();
m_rgbaParamSet->loadData(is);
m_rgbParamSet->removeAllParam();
m_rgbParamSet->loadData(is);
m_rParamSet->removeAllParam();
m_rParamSet->loadData(is);
m_gParamSet->removeAllParam();
m_gParamSet->loadData(is);
m_bParamSet->removeAllParam();
m_bParamSet->loadData(is);
m_aParamSet->removeAllParam();
m_aParamSet->loadData(is);
is.openChild(tagName);
m_isLinear->loadData(is);
is.closeChild();
is.closeChild();
}
示例5: loadData
void TRangeParam::loadData(TIStream &is)
{
std::string childName;
while (is.openChild(childName)) {
if (childName == "min")
m_data->m_min->loadData(is);
else if (childName == "max")
m_data->m_max->loadData(is);
else
throw TException("unknown tag");
is.closeChild();
}
}
示例6: loadData
void ShaderInterface::loadData(TIStream &is) {
struct locals {
inline static TFilePath getAbsolutePath(const TFilePath &file,
const TFilePath &relTo) {
QDir relToDir(
QString::fromStdWString(relTo.getParentDir().getWideString()));
QString absFileStr(relToDir.absoluteFilePath(
QString::fromStdWString(file.getWideString())));
return TFilePath(absFileStr.toStdWString());
}
static bool nameMatch(const QString &name, const Parameter ¶m) {
return (name == param.m_name);
}
};
std::string tagName;
try {
while (is.openChild(tagName)) {
if (tagName == l_names[MAIN_PROGRAM]) {
is >> m_mainShader;
m_mainShader.m_type = QGLShader::Fragment;
is.closeChild();
} else if (tagName == l_names[INPUT_PORTS]) {
while (is.openChild(tagName)) {
if (tagName == l_names[INPUT_PORT]) {
QString portName;
is >> portName;
m_ports.push_back(portName);
is.closeChild();
} else if (tagName == l_names[PORTS_PROGRAM]) {
is >> m_portsShader;
m_portsShader.m_type = QGLShader::Vertex;
is.closeChild();
} else
示例7: loadData
void TXshMeshColumn::loadData(TIStream &is) {
std::string tagName;
while (is.openChild(tagName)) {
if (tagName == "status") {
int status;
is >> status;
setStatusWord(status);
if (status & eCamstandTransparent43) {
setOpacity(128);
status = status & ~eCamstandTransparent43;
}
is.closeChild();
} else if (tagName == "camerastand_opacity") {
示例8: 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") {
示例9: loadData
void TTextureMesh::loadData(TIStream &is) {
typedef tcg::Mesh<vertex_type, edge_type, face_type> mesh_type;
std::string str;
int i, size;
while (is.openChild(str)) {
if (str == "V") {
is >> size;
m_vertices.reserve(size);
TTextureMesh::vertex_type v;
for (i = 0; i < size; ++i) {
is >> v.P().x >> v.P().y;
mesh_type::addVertex(v);
}
is.closeChild();
} else if (str == "E") {
示例10: loadData
void TExternalProgramFx::loadData(TIStream &is) {
std::string tagName;
while (is.openChild(tagName)) {
if (tagName == "path") {
is >> m_executablePath;
} else if (tagName == "args") {