本文整理汇总了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");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}