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