当前位置: 首页>>代码示例>>C++>>正文


C++ TIStream::openChild方法代码示例

本文整理汇总了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") {
开发者ID:AmEv7Fam,项目名称:opentoonz,代码行数:10,代码来源:tmacrofx.cpp

示例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
开发者ID:ArseniyShestakov,项目名称:opentoonz,代码行数:20,代码来源:txshsoundtextcolumn.cpp

示例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;
	}
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:11,代码来源:txshsoundcolumn.cpp

示例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();
}
开发者ID:Makoto-Sasahara,项目名称:opentoonz,代码行数:21,代码来源:ttonecurveparam.cpp

示例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();
	}
}
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:13,代码来源:trangeparam.cpp

示例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 &param) {
      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
开发者ID:SaierMe,项目名称:opentoonz,代码行数:38,代码来源:shaderinterface.cpp

示例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") {
开发者ID:SaierMe,项目名称:opentoonz,代码行数:14,代码来源:txshmeshcolumn.cpp

示例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") {
开发者ID:walkerka,项目名称:opentoonz,代码行数:48,代码来源:txsheet.cpp

示例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") {
开发者ID:SaierMe,项目名称:opentoonz,代码行数:20,代码来源:tmeshimage.cpp

示例10: loadData

void TExternalProgramFx::loadData(TIStream &is) {
  std::string tagName;
  while (is.openChild(tagName)) {
    if (tagName == "path") {
      is >> m_executablePath;
    } else if (tagName == "args") {
开发者ID:Makoto-Sasahara,项目名称:opentoonz,代码行数:6,代码来源:texternfx.cpp


注:本文中的TIStream::openChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。