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


C++ XMLOutputStream::setAutoIndent方法代码示例

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


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

示例1: getName

void
ASTCSymbolDelayNode::write(XMLOutputStream& stream) const
{
  if (&stream == NULL) return;

  stream.startElement("apply");
  
  stream.startElement("csymbol");

  stream.setAutoIndent(false);
  
  ASTBase::writeAttributes(stream);

  stream.writeAttribute( "encoding"     , mEncoding );
  stream.writeAttribute( "definitionURL", mDefinitionURL  );

  stream << " " << getName() << " ";
  
  stream.endElement("csymbol");
  
  stream.setAutoIndent(true);

  for (unsigned int n = 0; n < getNumChildren(); n++)
  {
    ASTFunctionBase::getChild(n)->write(stream);
  }
  
  stream.endElement("apply");
}
开发者ID:0u812,项目名称:libsbml.js.frozen,代码行数:29,代码来源:ASTCSymbolDelayNode.cpp

示例2: writeENotation

void
ASTCnExponentialNode::write(XMLOutputStream& stream) const
{
  stream.startElement("cn");

  stream.setAutoIndent(false);

  ASTCnBase::write(stream);

  writeENotation (  getMantissa(), getExponent(), stream);
  
  stream.endElement("cn");
  
  stream.setAutoIndent(true);
}
开发者ID:0u812,项目名称:libsbml.js.frozen,代码行数:15,代码来源:ASTCnExponentialNode.cpp

示例3: getInteger

void
ASTCnIntegerNode::write(XMLOutputStream& stream) const
{
  stream.startElement("cn");

  stream.setAutoIndent(false);

  ASTCnBase::write(stream);

  static const string type = "integer";
  stream.writeAttribute("type", type);

  stream << " " << getInteger() << " ";
  
  stream.endElement("cn");
  
  stream.setAutoIndent(true);
}
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:18,代码来源:ASTCnIntegerNode.cpp

示例4: getDefinitionURL

void
ASTCiNumberNode::write(XMLOutputStream& stream) const
{
  stream.startElement("ci");

  stream.setAutoIndent(false);
  
  ASTBase::writeAttributes(stream);

  if (isSetDefinitionURL() == true)
  {
    stream.writeAttribute("definitionURL", getDefinitionURL());
  }

  stream << " " << getName() << " ";
  
  stream.endElement("ci");
  
  stream.setAutoIndent(true);
}
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:20,代码来源:ASTCiNumberNode.cpp

示例5: getReal

void
ASTCnRealNode::write(XMLOutputStream& stream) const
{
  stream.startElement("cn");

  stream.setAutoIndent(false);

  ASTCnBase::write(stream);

  ostringstream output;

  output.precision(LIBSBML_DOUBLE_PRECISION);
  output << getReal();

  string            value_string = output.str();
  string::size_type position     = value_string.find('e');

  if (position == string::npos)
  {
    stream << " " << value_string << " ";
  }
  else
  {
    const string mantissa_string = value_string.substr(0, position);
    const string exponent_string = value_string.substr(position + 1);

    double mantissa = strtod(mantissa_string.c_str(), 0);
    long   exponent = strtol(exponent_string.c_str(), 0, 10);

    this->writeENotation(mantissa, exponent, stream);
  }

  stream.endElement("cn");
  
  stream.setAutoIndent(true);
}
开发者ID:sn248,项目名称:Rcppsbml,代码行数:36,代码来源:ASTCnRealNode.cpp


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