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


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

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


在下文中一共展示了XMLOutputStream::writeAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getPrefix

/*
 * Writes the attributes to the stream
 */
void
ClassThree::writeAttributes(XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetNumber() == true)
  {
    stream.writeAttribute("number", getPrefix(), Enum_toString(mNumber));
  }

  if (isSetName() == true)
  {
    stream.writeAttribute("name", getPrefix(), Fred_toString(mName));
  }

  if (isSetBadName() == true)
  {
    stream.writeAttribute("badName", getPrefix(), Fred_toString(mBadName));
  }

  if (isSetOtherNum() == true)
  {
    stream.writeAttribute("otherNum", getPrefix(), Enum_toString(mOtherNum));
  }

  SBase::writeExtensionAttributes(stream);
}
开发者ID:hovo1990,项目名称:deviser,代码行数:30,代码来源:ClassThree.cpp

示例3: getLevel

/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
CompartmentType::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  const unsigned int level = getLevel();
  const unsigned int version = getVersion();

  /* invalid level/version */
  if (level < 2 || (level == 2 && version == 1))
  {
    return;
  }

  //
  // id: SId  { use="required" }  (L2v2 ->)
  //
  stream.writeAttribute("id", mId);

  //
  // name: string  { use="optional" }  (L2v2 ->)
  //
  stream.writeAttribute("name", mName);
  //
  // sboTerm: SBOTerm { use="optional" }  (L2v3 ->)
  // is written in SBase::writeAttributes()
  //

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}
开发者ID:Alcibiades586,项目名称:roadrunner,代码行数:38,代码来源:CompartmentType.cpp

示例4: getLevel

/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
Trigger::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  const unsigned int level   = getLevel  ();
 
  /* invalid level/version */
  if (level < 2)
  {
    return;
  }

  //
  // sboTerm: SBOTerm { use="optional" }  (L2v3->)
  // is written in SBase::writeAttributes()
  //
  if (level > 2)
  {
    // in L3 only write it out if it has been set
    if (isSetInitialValue())
      stream.writeAttribute("initialValue", mInitialValue);
      // in L3 only write it out if it has been set
    if (isSetPersistent())
      stream.writeAttribute("persistent", mPersistent);
  }

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:37,代码来源:Trigger.cpp

示例5:

/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
NUMLDocument::writeAttributes (XMLOutputStream& stream) const
{
  if (mNUMLNamespaces->getNamespaces() == 0)
  {
     XMLNamespaces xmlns;

     if (mLevel == 1)
     {
        xmlns.add("http://www.numl.org/numl/level1/version1");
     }
     stream << xmlns;

     mNUMLNamespaces->setNamespaces(&xmlns);
  }  

  NMBase::writeAttributes(stream);

  //
  // level: positiveInteger  { use="required" fixed="1" }  (L1v1)
  stream.writeAttribute("level", mLevel);


  stream.writeAttribute("version", mVersion);
}
开发者ID:TheCoSMoCompany,项目名称:biopredyn,代码行数:30,代码来源:NUMLDocument.cpp

示例6: getPrefix

/*
 * Writes the attributes to the stream
 */
void
AnalyticVolume::writeAttributes(XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
  {
    stream.writeAttribute("id", getPrefix(), mId);
  }

  if (isSetFunctionType() == true)
  {
    stream.writeAttribute("functionType", getPrefix(),
      FunctionKind_toString(mFunctionType));
  }

  if (isSetOrdinal() == true)
  {
    stream.writeAttribute("ordinal", getPrefix(), mOrdinal);
  }

  if (isSetDomainType() == true)
  {
    stream.writeAttribute("domainType", getPrefix(), mDomainType);
  }

  SBase::writeExtensionAttributes(stream);
}
开发者ID:hovo1990,项目名称:deviser,代码行数:31,代码来源:AnalyticVolume.cpp

示例7: getPrefix

/*
 * Writes the attributes to the stream
 */
void
Output::writeAttributes(XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
  {
    stream.writeAttribute("id", getPrefix(), mId);
  }

  if (isSetQualitativeSpecies() == true)
  {
    stream.writeAttribute("qualitativeSpecies", getPrefix(),
      mQualitativeSpecies);
  }

  if (isSetTransitionEffect() == true)
  {
    stream.writeAttribute("transitionEffect", getPrefix(),
      TransitionOutputEffect_toString(mTransitionEffect));
  }

  if (isSetName() == true)
  {
    stream.writeAttribute("name", getPrefix(), mName);
  }

  if (isSetOutputLevel() == true)
  {
    stream.writeAttribute("outputLevel", getPrefix(), mOutputLevel);
  }

  SBase::writeExtensionAttributes(stream);
}
开发者ID:hovo1990,项目名称:deviser,代码行数:37,代码来源:Output.cpp

示例8: writeAttributes

/** @cond doxygenLibsbmlInternal */
void ListOfGlobalRenderInformation::writeAttributes (XMLOutputStream& stream) const
{
  ListOf::writeAttributes(stream);
  std::ostringstream os;
  os << this->mVersionMajor;
  stream.writeAttribute("versionMajor", getPrefix(), os.str());
  os.str("");
  os << this->mVersionMinor;
  stream.writeAttribute("versionMinor", getPrefix(), os.str());
}
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:11,代码来源:GlobalRenderInformation.cpp

示例9:

/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
CompositeDescription::writeAttributes (XMLOutputStream& stream) const
{
	NMBase::writeAttributes(stream);

	stream.writeAttribute("id", mId);
	stream.writeAttribute("name", mName);
	stream.writeAttribute("ontologyTerm", mOntologyTerm);
	stream.writeAttribute("indexType", mIndexType);
}
开发者ID:TheCoSMoCompany,项目名称:biopredyn,代码行数:15,代码来源:CompositeDescription.cpp

示例10: writeAttributes

/**
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.  For example:
 *
 *   SBase::writeAttributes(stream);
 *   stream.writeAttribute( "id"  , mId   );
 *   stream.writeAttribute( "name", mName );
 *   ...
 */
void Point::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);
  stream.writeAttribute("x", mXOffset);
  stream.writeAttribute("y", mYOffset);
  if(this->mZOffset!=0.0)
  {
    stream.writeAttribute("z", mZOffset);
  }
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:20,代码来源:Point.cpp

示例11: getPrefix

/*
 * Write values of XMLAttributes to the output stream.
 */
void
SedDocument::writeAttributes(XMLOutputStream& stream) const
{
  SedBase::writeAttributes(stream);

  if (isSetLevel() == true)
    stream.writeAttribute("level", getPrefix(), mLevel);

  if (isSetVersion() == true)
    stream.writeAttribute("version", getPrefix(), mVersion);

}
开发者ID:0u812,项目名称:libSEDML,代码行数:15,代码来源:SedDocument.cpp

示例12: getPrefix

/*
 * Write values of XMLAttributes to the output stream.
 */
  void
DomainType::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
    stream.writeAttribute("id", getPrefix(), mId);

  if (isSetSpatialDimensions() == true)
    stream.writeAttribute("spatialDimensions", getPrefix(), mSpatialDimensions);

}
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:15,代码来源:DomainType.cpp

示例13: getPrefix

/*
 * Write values of XMLAttributes to the output stream.
 */
void
SedSimulation::writeAttributes(XMLOutputStream& stream) const
{
  SedBase::writeAttributes(stream);

  if (isSetId() == true)
    stream.writeAttribute("id", getPrefix(), mId);

  if (isSetName() == true)
    stream.writeAttribute("name", getPrefix(), mName);

}
开发者ID:0u812,项目名称:libSEDML,代码行数:15,代码来源:SedSimulation.cpp

示例14: getPrefix

/*
 * Write values of XMLAttributes to the output stream.
 */
  void
AdvectionCoefficient::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetVariable() == true)
    stream.writeAttribute("variable", getPrefix(), mVariable);

  if (isSetCoordinate() == true)
    stream.writeAttribute("coordinate", getPrefix(), CoordinateKind_toString(mCoordinate));

}
开发者ID:kirichoi,项目名称:roadrunner,代码行数:15,代码来源:AdvectionCoefficient.cpp

示例15: getPrefix

/*
 * Write values of XMLAttributes to the output stream.
 */
void
SedSubTask::writeAttributes(XMLOutputStream& stream) const
{
  SedBase::writeAttributes(stream);

  if (isSetOrder() == true)
    stream.writeAttribute("order", getPrefix(), mOrder);

  if (isSetTask() == true)
    stream.writeAttribute("task", getPrefix(), mTask);

}
开发者ID:0u812,项目名称:libSEDML,代码行数:15,代码来源:SedSubTask.cpp


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