• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TIStream类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中TIStream的典型用法代码示例。如果您正苦于以下问题:C++ TIStream类的具体用法?C++ TIStream怎么用?C++ TIStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TIStream类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: loadData

void TPinnedRangeSet::loadData(TIStream &is) {
  m_ranges.clear();
  int prevFrame = 0;
  int i         = 0;
  std::string tagName;
  int count = 0;
  while (is.matchTag(tagName) && count < 3) {
    if (tagName == "permanent") {
      while (!is.matchEndTag()) {
        i++;
        int frame = 0;
        is >> frame;
        if (i % 2 == 0) m_ranges.push_back(Range(prevFrame, frame));
        prevFrame = frame;
      }
      count++;
    } else if (tagName == "temp") {
      assert(0);
      // OBSOLETO
      while (!is.matchEndTag()) {
        int frame = 0;
        is >> frame;
        // m_tempPinned.push_back(frame);
      }
      count++;
    } else if (tagName == "lockedAngle") {
开发者ID:Makoto-Sasahara,项目名称:opentoonz,代码行数:26,代码来源:tpinnedrangeset.cpp


示例2: 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


示例3: 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 {
开发者ID:Makoto-Sasahara,项目名称:opentoonz,代码行数:10,代码来源:tstageobjectspline.cpp


示例4: 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


示例5: 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


示例6: 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


示例7: loadData

void TXshZeraryFxColumn::loadData(TIStream &is)
{
	TPersist *p = 0;
	is >> p;
	if (!p)
		return;

	TZeraryColumnFx *fx = dynamic_cast<TZeraryColumnFx *>(p);
	fx->addRef();
	if (m_zeraryColumnFx) {
		m_zeraryColumnFx->setColumn(0);
		m_zeraryColumnFx->release();
	}
	m_zeraryColumnFx = fx;
	m_zeraryColumnFx->setColumn(this);

	int r0, r1;
	bool touched = false;
	const TXshCell cell(m_zeraryFxLevel, TFrameId(1));
	string tagName;
	while (is.matchTag(tagName)) {
		if (tagName == "status") {
			int status;
			is >> status;
			setStatusWord(status);
		} else if (tagName == "cells") {
开发者ID:ArseniyShestakov,项目名称:opentoonz,代码行数:26,代码来源:txshzeraryfxcolumn.cpp


示例8: loadData

void SkVD::loadData(TIStream &is)
{
	string tagName;

	while (is.matchTag(tagName)) {
		int p;
		for (p = 0; p < PARAMS_COUNT; ++p) {
			if (tagName == parNames[p]) {
				is >> *m_params[p], is.matchEndTag();
				break;
			}
		}

		if (p >= PARAMS_COUNT)
			is.skipCurrentTag();
	}
开发者ID:natowi,项目名称:opentoonz,代码行数:16,代码来源:plasticskeletondeformation.cpp


示例9: loadData

void TFarmTask::loadData(TIStream &is)
{
	string tagName;
	while (is.matchTag(tagName)) {
		if (tagName == "taskId") {
			is >> m_id;
		} else if (tagName == "parentId") {
开发者ID:ArseniyShestakov,项目名称:opentoonz,代码行数:7,代码来源:tfarmtask.cpp


示例10: loadData

void TScannerParameters::loadData(TIStream &is) {
  std::string tagName;
  while (is.matchTag(tagName)) {
    if (tagName == "dpi") {
      std::string s                  = is.getTagAttribute("value");
      if (isDouble(s)) m_dpi.m_value = std::stof(s);
    } else if (tagName == "brightness") {
      std::string s                         = is.getTagAttribute("value");
      if (isDouble(s)) m_brightness.m_value = std::stof(s);
    } else if (tagName == "threshold") {
      std::string s                        = is.getTagAttribute("value");
      if (isDouble(s)) m_threshold.m_value = std::stof(s);
    } else if (tagName == "contrast") {
      std::string s                       = is.getTagAttribute("value");
      if (isDouble(s)) m_contrast.m_value = std::stof(s);
    } else if (tagName == "autoFeeder") {
      m_paperFeeder.m_value = 1.0;
    } else if (tagName == "reverseOrder") {
      m_reverseOrder = true;
    } else if (tagName == "mode") {
      std::string scanTypeString = is.getTagAttribute("value");
      m_scanType                 = None;
      if (scanTypeString == BlackAndWhite)
        m_scanType = BW;
      else if (scanTypeString == Graytones)
        m_scanType = GR8;
      else if (scanTypeString == Rgbcolors)
        m_scanType = RGB24;
    } else if (tagName == "paper") {
      std::string paperFormat = is.getTagAttribute("fmt");
      if (paperFormat != "") setPaperFormat(paperFormat);
    }
  }
  m_validatedByCurrentScanner = false;
}
开发者ID:walkerka,项目名称:opentoonz,代码行数:35,代码来源:tscanner.cpp


示例11: 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


示例12: 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


示例13: 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


示例14: 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


示例15: 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


示例16: 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);
}
开发者ID:AmEv7Fam,项目名称:opentoonz,代码行数:14,代码来源:tnotanimatableparam.cpp


示例17: saveData

/*! Set all scene properties elements, to information contained in \b TIStream \b is.
		\sa saveData()
*/
void TSceneProperties::loadData(TIStream &is, bool isLoadingProject)
{
	TSceneProperties defaultProperties;
	assign(&defaultProperties);

	int globFrom = -1, globTo = 0, globStep = 1;
	double globFrameRate = -1;
	std::string tagName;
	*m_outputProp = *m_previewProp = TOutputProperties();
	while (is.matchTag(tagName)) {
		if (tagName == "projectPath") {
			TFilePath projectPath;
			is >> projectPath;
		} else if (tagName == "range") {
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:17,代码来源:sceneproperties.cpp


示例18: buf

void
MessageGeneric::load(TIStream& in)
{
	util::T_UI4 val;
	in >> val;
	m_commandType = val;

	unsigned int count = 0;
	in >> count;

	for (int i = 1; i <= count; i++){
		unsigned int len = 0;
		in >> len;

		util::ScopedArray<char> buf(new char[len + 1]);
		memset(buf.get(), 0, len + 1);

		in.read(reinterpret_cast<unsigned char*>(buf.get()), len);

		m_params.push_back(buf.get());
	}
}
开发者ID:kevinhaeni,项目名称:QT-Cpp-Network-Filetransfer,代码行数:22,代码来源:MessageGeneric.cpp


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


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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TIXML_STRING类代码示例发布时间:2022-05-31
下一篇:
C++ TIMER类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap