コード例 #1
0
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
0
ファイル: ClassThree.cpp プロジェクト: hovo1990/deviser
/*
 * 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
0
/*
 * 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
0
ファイル: Trigger.cpp プロジェクト: TotteKarlsson/roadrunner
/*
 * 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
0
/*
 * 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
0
ファイル: AnalyticVolume.cpp プロジェクト: hovo1990/deviser
/*
 * 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
0
ファイル: Output.cpp プロジェクト: hovo1990/deviser
/*
 * 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
0
/** @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
0
/*
 * 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
0
ファイル: Point.cpp プロジェクト: mgaldzic/copasi_api
/**
 * 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
0
ファイル: SedDocument.cpp プロジェクト: 0u812/libSEDML
/*
 * 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
0
/*
 * 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
0
ファイル: SedSimulation.cpp プロジェクト: 0u812/libSEDML
/*
 * 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
0
/*
 * 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
0
ファイル: SedSubTask.cpp プロジェクト: 0u812/libSEDML
/*
 * 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);

}
コード例 #16
0
/*
 * 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 RenderCurve::writeAttributes (XMLOutputStream& stream) const
{
  GraphicalPrimitive1D::writeAttributes(stream);
  if(this->isSetStartHead())
  {
      stream.writeAttribute("startHead", getPrefix(), this->mStartHead);
  }
  if(this->isSetEndHead())
  {
      stream.writeAttribute("endHead", getPrefix(), this->mEndHead);
  }
}
コード例 #17
0
ファイル: Domain.cpp プロジェクト: kirichoi/roadrunner
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
Domain::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

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

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

}
コード例 #18
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
GeneProductAssociation::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

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

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

}
コード例 #19
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
ImageData::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetSamplesLength() == true)
    stream.writeAttribute("samplesLength", getPrefix(), mSamplesLength);

  if (isSetDataType() == true)
    stream.writeAttribute("dataType", getPrefix(), mDataType);

}
コード例 #20
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
FbcSpeciesPlugin::writeAttributes (XMLOutputStream& stream) const
{
  SBasePlugin::writeAttributes(stream);

  if (isSetCharge() == true)
    stream.writeAttribute("charge", getPrefix(), mCharge);

  if (isSetChemicalFormula() == true)
    stream.writeAttribute("chemicalFormula", getPrefix(), mChemicalFormula);

}
コード例 #21
0
ファイル: Port.cpp プロジェクト: 0u812/roadrunner-backup
/** @cond doxygenLibsbmlInternal */
void
Port::writeAttributes (XMLOutputStream& stream) const
{
  SBaseRef::writeAttributes(stream);

  if (isSetId()) {
    stream.writeAttribute("id", getPrefix(), mId);
  }
  if (isSetName()) {
    stream.writeAttribute("name", getPrefix(), mName);
  }
}
コード例 #22
0
ファイル: SedRepeatedTask.cpp プロジェクト: jeicher/libSEDML
/*
 * Write values of XMLAttributes to the output stream.
 */
	void
SedRepeatedTask::writeAttributes (XMLOutputStream& stream) const
{
	SedTask::writeAttributes(stream);

	if (isSetRangeId() == true)
		stream.writeAttribute("range", getPrefix(), mRangeId);

	if (isSetResetModel() == true)
		stream.writeAttribute("resetModel", getPrefix(), mResetModel);

}
コード例 #23
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
DynEventPlugin::writeAttributes (XMLOutputStream& stream) const
{
  SBasePlugin::writeAttributes(stream);

  if (isSetCboTerm() == true)
    stream.writeAttribute("cboTerm", getPrefix(), mCboTerm);

  if (isSetApplyToAll() == true)
    stream.writeAttribute("applyToAll", getPrefix(), mApplyToAll);

}
コード例 #24
0
/** @cond doxygenLibsbmlInternal */
void
GeneAssociation::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  stream.writeAttribute("id",   getPrefix(), mId);
  stream.writeAttribute("reaction",   getPrefix(), mReaction);

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}
コード例 #25
0
/*
 * 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 AtomicDescription::writeAttributes(XMLOutputStream& stream) const
{
	NMBase::writeAttributes(stream);

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

	stream.writeAttribute("id", mId);
	stream.writeAttribute("name", mName);
	stream.writeAttribute("ontologyTerm", mOntologyTerm);
	stream.writeAttribute("valueType", mValueType);

}
コード例 #26
0
ファイル: Style.cpp プロジェクト: sys-bio/libroadrunner-deps
/*
 * 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 Style::writeAttributes (XMLOutputStream& stream) const
{
    SBase::writeAttributes(stream);
    stream.writeAttribute("id", getPrefix(), this->mId);
    if(this->isSetName())
    {
        stream.writeAttribute("name", getPrefix(), this->mName);
    }
    // write role list
    this->writeRolesList(stream);
    // write type list
    this->writeTypeList(stream);
}
コード例 #27
0
ファイル: ClassOne.cpp プロジェクト: hovo1990/deviser
/*
 * Writes the attributes to the stream
 */
void
ClassOne::writeV2Attributes(XMLOutputStream& stream) const
{
  if (isSetId() == true)
  {
    stream.writeAttribute("id", getPrefix(), mId);
  }

  if (isSetAtt2() == true)
  {
    stream.writeAttribute("att2", getPrefix(), mAtt2);
  }
}
コード例 #28
0
/** @cond doxygenLibsbmlInternal */
void
ReplacedElement::writeAttributes (XMLOutputStream& stream) const
{
  Replacing::writeAttributes(stream);

  if (isSetDeletion()) {
    stream.writeAttribute("deletion", getPrefix(), mDeletion);
  }
  if (isSetConversionFactor()) {
    stream.writeAttribute("conversionFactor", getPrefix(), mConversionFactor);
  }

  Replacing::writeExtensionAttributes(stream);
}
コード例 #29
0
void 
SpatialSpeciesRxnPlugin::writeAttributes (XMLOutputStream& stream) const
{
  if ( isSetIsSpatial() ) 
  {
	  XMLTriple tripleIsSpatial("isSpatial", mURI, mPrefix);
	  stream.writeAttribute(tripleIsSpatial, mIsSpatial);
  }
  if ( isSetIsLocal() )
  {
	  XMLTriple tripleIsLocal("isLocal", mURI, mPrefix);
	  stream.writeAttribute(tripleIsLocal, mIsLocal);
  }
}
コード例 #30
0
/*
 * 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
ParametricObject::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  stream.writeAttribute("spatialId",   getPrefix(), mSpatialId);
  stream.writeAttribute("domain",   getPrefix(), mDomain);
  stream.writeAttribute("polygonType",   getPrefix(), mPolygonType);

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}