本文整理汇总了C++中pacc::xml::Streamer::closeTag方法的典型用法代码示例。如果您正苦于以下问题:C++ Streamer::closeTag方法的具体用法?C++ Streamer::closeTag怎么用?C++ Streamer::closeTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pacc::xml::Streamer
的用法示例。
在下文中一共展示了Streamer::closeTag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*!
* \brief Write switch type operator into an XML stream.
* \param ioStreamer XML stream in which the operator is written.
* \param inIndent Whether XML output should be indented.
*/
void HPC::SwitchTypeOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag(getName(), inIndent);
for(OperatorSetMap::const_iterator lIterMap = mOperatorSetMap.begin(); lIterMap != mOperatorSetMap.end(); ++lIterMap){
ioStreamer.openTag(lIterMap->first, inIndent);
for(Operator::Bag::const_iterator lIterBag = lIterMap->second.begin(); lIterBag != lIterMap->second.end(); ++lIterBag){
Operator::Handle lOp = castHandleT<Operator>(*lIterBag);
lOp->write(ioStreamer, inIndent);
}
ioStreamer.closeTag();
}
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例2:
/*!
* \brief Write an instruction super set into a Beagle XML stream.
* \param ioStreamer XMl streamer to write the super set into.
* \param inIndent Whether XML output should be indented.
*/
void LinGP::InstructionSuperSet::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
ioStreamer.openTag("InstructionSuperSet", inIndent);
for(unsigned int i=0; i<mInstructionSets.size(); i++) {
mInstructionSets[i]->write(ioStreamer);
}
ioStreamer.closeTag();
}
示例3:
/*!
* \brief Write a primitive super set into a Beagle XML stream.
* \param ioStreamer XMl streamer to write the super set into.
* \param inIndent Whether XML output should be indented.
*/
void GP::PrimitiveSuperSet::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("GP-PrimitiveSuperSet", inIndent);
for(unsigned int i=0; i<mPrimitSets.size(); i++) mPrimitSets[i]->write(ioStreamer, inIndent);
ioStreamer.closeTag();
Beagle_StackTraceEndM("void GP::PrimitiveSuperSet::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
示例4: writeContent
void PopulationManager::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const {
schnaps_StackTraceBeginM();
// write generator
mGenerator->write(ioStreamer, inIndent);
// write population source
ioStreamer.openTag("Population");
for (PopulationManager::const_iterator lIt = this->begin(); lIt != this->end(); lIt++) {
ioStreamer.openTag("SubPopulation");
ioStreamer.insertAttribute("time", SCHNAPS::uint2str(lIt->first));
ioStreamer.insertAttribute("profile", lIt->second.mProfile);
ioStreamer.insertAttribute("size", SCHNAPS::uint2str(lIt->second.mSize));
ioStreamer.closeTag();
}
ioStreamer.closeTag();
schnaps_StackTraceEndM("void SCHNAPS::Simulation::PopulationManager::writeContent(PACC::XML::Streamer&, bool) const");
}
示例5: write
/*!
* \brief Write a genotype into a XML streamer.
* \param ioStreamer XML streamer to use.
* \param inIndent Whether XML output should be indented.
*/
void Genotype::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Genotype", inIndent);
ioStreamer.insertAttribute("type", getType());
writeContent(ioStreamer, inIndent);
ioStreamer.closeTag();
Beagle_StackTraceEndM("void Genotype::write(PACC::XML::Streamer&,bool) const");
}
示例6:
/*!
* \brief Write an max hits termination operator into a XML stream.
* \param ioStreamer XML streamer in which the operator is written.
* \param inIndent Whether XML output should be indented.
*/
void GP::TermMaxHitsOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag(getName(), inIndent);
if(mMaxHits != NULL) ioStreamer.insertAttribute("hits", uint2str(mMaxHits->getWrappedValue()));
else ioStreamer.insertAttribute("hits", uint2str(mMaxHitsDefault));
ioStreamer.closeTag();
Beagle_StackTraceEndM("void GP::TermMaxHitsOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
示例7: write
/*!
* \brief Write concept map of the factory into a XML streamer.
* \param ioStreamer XML streamer to write factory concept map into.
* \param inIndent Whether XML output should be indented.
*/
void Factory::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Factory", inIndent);
std::map< std::string, std::string > lSortedMap;
for(Factory::ConceptMap::const_iterator lIter=mConceptMap.begin();
lIter!=mConceptMap.end(); ++lIter) {
lSortedMap[lIter->first] = lIter->second;
}
for(std::map< std::string, std::string >::const_iterator lIterSM=lSortedMap.begin();
lIterSM!=lSortedMap.end(); ++lIterSM) {
ioStreamer.openTag("Concept", false);
ioStreamer.insertAttribute("name", lIterSM->first);
ioStreamer.insertAttribute("type", lIterSM->second);
ioStreamer.closeTag();
}
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例8: write
/*!
* \brief Write a max fitness termination operator into a XML stream.
* \param ioStreamer XML stream in which the operator is written.
* \param inIndent Whether XML output should be indented.
*/
void TermMaxFitnessOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag(getName(), inIndent);
if(mMaxFitness != NULL)
ioStreamer.insertAttribute("fitness", dbl2str(mMaxFitness->getWrappedValue()));
else ioStreamer.insertAttribute("fitness", dbl2str(mMaxFitnessDefault));
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例9: write
/*!
* \brief Write OversizeOp operator into XML streamer.
* \param ioStreamer XML streamer to write OversizeOp operator into.
* \param inIndent Whether XML output should be indented.
*/
void OversizeOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag(getName(), inIndent);
ioStreamer.insertAttribute("ratio_name", mOversizeRatioName);
for(BreederNode::Handle lNode=getRootNode(); lNode!=NULL; lNode=lNode->getNextSibling()) {
lNode->write(ioStreamer, inIndent);
}
ioStreamer.closeTag();
Beagle_StackTraceEndM("void OversizeOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
示例10:
/*!
* \brief Write a Koza's fitness into a Beagle XML streamer.
* \param ioStreamer XML streamer to use to write the fitness values.
* \param inIndent Whether XML output should be indented.
*/
void GP::FitnessKoza::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Normalized", false);
ioStreamer.insertStringContent(dbl2str(mValue));
ioStreamer.closeTag();
ioStreamer.openTag("Adjusted", false);
ioStreamer.insertStringContent(dbl2str(mAdjustedFitness));
ioStreamer.closeTag();
ioStreamer.openTag("Standardized", false);
ioStreamer.insertStringContent(dbl2str(mStandardizedFitness));
ioStreamer.closeTag();
ioStreamer.openTag("Raw", false);
ioStreamer.insertStringContent(dbl2str(mRawFitness));
ioStreamer.closeTag();
ioStreamer.openTag("Hits", false);
ioStreamer.insertStringContent(uint2str(mHits));
ioStreamer.closeTag();
Beagle_StackTraceEndM("void GP::FitnessKoza::writeContent(PACC::XML::Streamer&, bool) const");
}
示例11: writeContent
/*!
* \brief Write a multiobjective fitness into an XML streamer.
* \param ioStreamer XML streamer to use to write the fitness value.
* \param inIndent Whether XML output should be indented.
*/
void FitnessMultiObj::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.insertAttribute("size", uint2str(size()));
for(unsigned int i=0; i<size(); ++i) {
ioStreamer.openTag("Obj", false);
ioStreamer.insertStringContent(dbl2str((*this)[i]));
ioStreamer.closeTag();
}
Beagle_StackTraceEndM();
}
示例12: writePopulation
/*!
* \brief Write the actual vivarium population in a XML streamer.
* \param ioStreamer XML streamer to write the vivarium population into.
* \param inIndent Whether XML output should be indented.
*/
void Vivarium::writePopulation(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Population", inIndent);
ioStreamer.insertAttribute("size", uint2str(size()));
for(unsigned int i=0; i<size(); ++i) {
Beagle_NonNullPointerAssertM((*this)[i]);
(*this)[i]->write(ioStreamer, inIndent);
}
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例13: writeFitness
/*!
* \brief Write fitness of an individual into a XML streamer.
* \param ioStreamer XML streamer to write the fitness into.
* \param inIndent Whether XML output should be indented.
*/
void Individual::writeFitness(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
if(mFitness == NULL) {
ioStreamer.openTag("Fitness", false);
ioStreamer.insertAttribute("valid", "no");
ioStreamer.closeTag();
} else {
mFitness->write(ioStreamer, inIndent);
}
Beagle_StackTraceEndM();
}
示例14: writeContent
/*!
* \brief Write a stats into a XML streamer.
* \param ioStreamer XML streamer used to write the stats into.
* \param inIndent Whether XML output should be indented.
*/
void Stats::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
if(mValid) {
if(mID.empty() == false) ioStreamer.insertAttribute("id", mID);
ioStreamer.insertAttribute("generation", uint2str(mGeneration));
ioStreamer.insertAttribute("popsize", uint2str(mPopSize));
std::set<std::string> lSortedItemKey;
for(ItemMap::const_iterator lIterMap=mItemMap.begin(); lIterMap!=mItemMap.end(); ++lIterMap) {
lSortedItemKey.insert(lIterMap->first);
}
for(std::set<std::string>::const_iterator lIterSet=lSortedItemKey.begin();
lIterSet!=lSortedItemKey.end(); ++lIterSet) {
ioStreamer.openTag("Item", false);
ioStreamer.insertAttribute("key", *lIterSet);
ItemMap::const_iterator lIterMap = mItemMap.find(*lIterSet);
ioStreamer.insertStringContent(dbl2str(lIterMap->second,12));
ioStreamer.closeTag();
}
for(unsigned int i=0; i<size(); ++i) {
ioStreamer.openTag("Measure", inIndent);
ioStreamer.insertAttribute("id", (*this)[i].mID);
ioStreamer.openTag("Avg", false);
ioStreamer.insertStringContent(dbl2str((*this)[i].mAvg,12));
ioStreamer.closeTag();
ioStreamer.openTag("Std", false);
ioStreamer.insertStringContent(dbl2str((*this)[i].mStd,12));
ioStreamer.closeTag();
ioStreamer.openTag("Max", false);
ioStreamer.insertStringContent(dbl2str((*this)[i].mMax,12));
ioStreamer.closeTag();
ioStreamer.openTag("Min", false);
ioStreamer.insertStringContent(dbl2str((*this)[i].mMin,12));
ioStreamer.closeTag();
ioStreamer.closeTag();
}
} else ioStreamer.insertAttribute("valid", "no");
Beagle_StackTraceEndM("void Stats::writeContent(PACC::XML::Streamer&,bool) const");
}
示例15: writeMembers
/*!
* \brief Write members of the vivarium in a XML streamer.
* \param ioStreamer XML streamer to write the members into.
* \param inIndent Whether XML output should be indented.
*/
void Vivarium::writeMembers(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
for(MemberMap::const_iterator lIterMap=mMemberMap.begin();
lIterMap!=mMemberMap.end(); ++lIterMap) {
ioStreamer.openTag(lIterMap->first, inIndent);
Member::Handle lMember = castHandleT<Member>(lIterMap->second);
ioStreamer.insertAttribute("type", lMember->getType());
lMember->writeContent(ioStreamer, inIndent);
ioStreamer.closeTag();
}
Beagle_StackTraceEndM();
}