本文整理汇总了C++中pacc::xml::Streamer类的典型用法代码示例。如果您正苦于以下问题:C++ Streamer类的具体用法?C++ Streamer怎么用?C++ Streamer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Streamer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeContent
/*!
* \brief Write recombination operator content into XML streamer.
* \param ioStreamer XML streamer to write recombination operator into.
* \param inIndent Whether output should be indented.
*/
void RecombinationOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.insertAttribute("recombpb", mRecombProbaName);
ioStreamer.insertAttribute("nbrindrecomb", mNumberRecombName);
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: 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");
}
示例5:
/*!
* \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");
}
示例6:
/*!
* \brief Write Gaussian mutation operator into XML streamer.
* \param ioStreamer XML streamer to write mutation operator into.
* \param inIndent Whether XML output should be indented.
*/
void FltVec::MutationGaussianOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
EC::MutationOp::writeContent(ioStreamer, inIndent);
ioStreamer.insertAttribute("mutfloatpb", mMutateFloatPbName);
ioStreamer.insertAttribute("mutgaussmu", mMutateGaussMuName);
ioStreamer.insertAttribute("mutgausssigma", mMutateGaussSigmaName);
Beagle_StackTraceEndM();
}
示例7: 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();
}
示例8: 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();
}
示例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: 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();
}
示例11: 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();
}
示例12:
/*!
* \brief Write a float vector into a XML streamer.
* \param ioStreamer XML streamer into which the float vector is written.
* \param inIndent Whether output should be indented.
*/
void GA::IntegerVector::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.insertAttribute("size", uint2str(size()));
std::ostringstream lOSS;
for(unsigned int i=0; i<size(); ++i) {
lOSS << (*this)[i];
if(i!=(size()-1)) lOSS << ';';
}
ioStreamer.insertStringContent(lOSS.str());
Beagle_StackTraceEndM("void GA::IntegerVector::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
示例13:
/*!
* \brief Write an ES vector into a XML streamer.
* \param ioStreamer XML streamer into which the ES vector is written.
* \param inIndent Whether output should be indented.
*/
void GA::ESVector::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.insertAttribute("size", uint2str(size()));
std::ostringstream lOSS;
for(unsigned int i=0; i<size(); i++) {
lOSS << '(' << (*this)[i].mValue << ',' << (*this)[i].mStrategy << ')';
if(i!=(size()-1)) lOSS << '/';
}
ioStreamer.insertStringContent(lOSS.str());
Beagle_StackTraceEndM("void GA::ESVector::write(PACC::XML::Streamer&,bool) const");
}
示例14: 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();
}
示例15:
/*!
* \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();
}