本文整理汇总了C++中IArchive::labelElement方法的典型用法代码示例。如果您正苦于以下问题:C++ IArchive::labelElement方法的具体用法?C++ IArchive::labelElement怎么用?C++ IArchive::labelElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IArchive
的用法示例。
在下文中一共展示了IArchive::labelElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serialize
void SusceptibilityVector::serialize(IArchive& ar, SusceptibilityVector* obj)
{
SusceptibilityVector& susceptibility = *obj;
Susceptibility::serialize(ar, obj);
ar.labelElement("m_relative_biting_rate") & susceptibility.m_relative_biting_rate;
ar.labelElement("m_age_dependent_biting_risk") & susceptibility.m_age_dependent_biting_risk;
}
示例2: serialize
void AbstractBednet::serialize( IArchive& ar, AbstractBednet* obj )
{
BaseIntervention::serialize( ar, obj );
AbstractBednet& bednet = *obj;
ar.labelElement( "m_pEffectBlocking" ) & bednet.m_pEffectBlocking;
ar.labelElement( "m_pEffectKilling" ) & bednet.m_pEffectKilling;
}
示例3: serialize
void serialize(IArchive& ar, IndividualHumanMalaria::gametocytes_strain_map_t& mapping)
{
size_t count = ar.IsWriter() ? mapping.size() : -1;
ar.startArray(count);
if (ar.IsWriter())
{
for (auto& entry : mapping)
{
StrainIdentity* strain = const_cast<StrainIdentity*>(&entry.first);
ar.startObject();
ar.labelElement("key"); serialize(ar, strain);
ar.labelElement("value") & entry.second;
ar.endObject();
}
}
else
{
for (size_t i = 0; i < count; i++)
{
StrainIdentity* strain;
int64_t value;
ar.startObject();
ar.labelElement("key"); serialize(ar, strain);
ar.labelElement("value") & value;
ar.endObject();
mapping[*strain] = value;
}
}
ar.endArray();
}
示例4: serialize
void BaseIntervention::serialize(IArchive& ar, BaseIntervention* obj)
{
BaseIntervention& intervention = *obj;
ar.labelElement("cost_per_unit" ) & intervention.cost_per_unit;
ar.labelElement("expired" ) & intervention.expired;
ar.labelElement("dont_allow_duplicates") & intervention.dont_allow_duplicates;
}
示例5:
void HIVARTStagingByCD4Diagnostic::serialize(IArchive& ar, HIVARTStagingByCD4Diagnostic* obj)
{
HIVARTStagingAbstract::serialize( ar, obj );
HIVARTStagingByCD4Diagnostic& diag = *obj;
ar.labelElement("threshold" ) & diag.threshold;
ar.labelElement("ifActiveTB") & diag.ifActiveTB;
ar.labelElement("ifPregnant") & diag.ifPregnant;
}
示例6: serialize
void InterventionsContainer::serialize(IArchive& ar, InterventionsContainer* obj)
{
InterventionsContainer& container = *obj;
ar.labelElement("drugVaccineReducedAcquire") & container.drugVaccineReducedAcquire;
ar.labelElement("drugVaccineReducedTransmit") & container.drugVaccineReducedTransmit;
ar.labelElement("drugVaccineReducedMortality") & container.drugVaccineReducedMortality;
ar.labelElement("interventions") & container.interventions;
}
示例7: serialize
void SimpleVaccine::serialize(IArchive& ar, SimpleVaccine* obj)
{
BaseIntervention::serialize( ar, obj );
SimpleVaccine& vaccine = *obj;
ar.labelElement("vaccine_type") & vaccine.vaccine_type;
ar.labelElement("vaccine_take") & vaccine.vaccine_take;
ar.labelElement("vaccine_took") & vaccine.vaccine_took;
ar.labelElement("waning_effect") & vaccine.waning_effect;
}
示例8: serialize
void IndividualHumanVector::serialize(IArchive& ar, IndividualHumanVector* obj)
{
IndividualHumanVector& individual = *obj;
IndividualHuman::serialize(ar, obj);
ar.labelElement("m_strain_exposure");
Kernel::serialize(ar, individual.m_strain_exposure);
ar.labelElement("m_total_exposure") & individual.m_total_exposure;
}
示例9: serialize
void HIVSimpleDiagnostic::serialize(IArchive& ar, HIVSimpleDiagnostic* obj)
{
SimpleDiagnostic::serialize( ar, obj );
HIVSimpleDiagnostic& hsd = *obj;
ar.labelElement("firstUpdate" ) & hsd.firstUpdate;
ar.labelElement("result_of_positive_test" ) & hsd.result_of_positive_test;
ar.labelElement("original_days_to_diagnosis") & hsd.original_days_to_diagnosis;
ar.labelElement("absoluteDuration" ) & hsd.absoluteDuration;
ar.labelElement("negative_diagnosis_event" ) & hsd.negative_diagnosis_event;
}
示例10: serialize
void DiagnosticTreatNeg::serialize(IArchive& ar, DiagnosticTreatNeg* obj)
{
SimpleDiagnostic::serialize(ar, obj);
DiagnosticTreatNeg& diagnostic = *obj;
ar.labelElement("negative_diagnosis_config") & diagnostic.negative_diagnosis_config;
ar.labelElement("negative_diagnosis_event") & diagnostic.negative_diagnosis_event;
ar.labelElement("defaulters_config") & diagnostic.defaulters_config;
ar.labelElement("defaulters_event") & diagnostic.defaulters_event;
ar.labelElement("m_gets_positive_test_intervention") & diagnostic.m_gets_positive_test_intervention;
}
示例11: serialize
void HIVDelayedIntervention::serialize(IArchive& ar, HIVDelayedIntervention* obj)
{
DelayedIntervention::serialize( ar, obj );
HIVDelayedIntervention& delayed = *obj;
ar.labelElement("year2DelayMap" ) & delayed.year2DelayMap;
ar.labelElement("days_remaining" ) & delayed.days_remaining;
ar.labelElement("broadcast_event" ) & delayed.broadcast_event;
ar.labelElement("broadcast_on_expiration_event" ) & delayed.broadcast_on_expiration_event;
}
示例12: serialize
void WaningEffectMapAbstract::serialize( IArchive& ar, WaningEffectMapAbstract* obj )
{
WaningEffectMapAbstract& effect = *obj;
ar.labelElement( "m_Expired" ) & effect.m_Expired;
ar.labelElement( "m_EffectOriginal" ) & effect.m_EffectOriginal;
ar.labelElement( "m_EffectCurrent" ) & effect.m_EffectCurrent;
ar.labelElement( "m_ExpireAtDurationMapEnd" ) & effect.m_ExpireAtDurationMapEnd;
ar.labelElement( "m_TimeSinceStart" ) & effect.m_TimeSinceStart;
ar.labelElement( "m_DurationMap" ) & effect.m_DurationMap;
}
示例13: serialize
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!! In a scenario like 25_Madagascar that has 30000+ nodes,
// !!! we really have to minimize the data that is being shared
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
void NodeInfo::serialize( IArchive& ar, bool firstTime )
{
if( firstTime )
{
ar.labelElement("m_Suid" ) & m_Suid.data;
ar.labelElement("m_ExternalId" ) & m_ExternalId;
ar.labelElement("m_Rank" ) & m_Rank;
ar.labelElement("m_LongitudeDegrees" ) & m_LongitudeDegrees;
ar.labelElement("m_LatitudeDegrees" ) & m_LatitudeDegrees;
}
ar.labelElement("m_Population" ) & m_Population;
}
示例14: serialize
void serialize(IArchive& ar, pfemp1_antibody_t& antibodies)
{
ar.startObject();
ar.labelElement("minor") & antibodies.minor;
ar.labelElement("major") & antibodies.major;
ar.endObject();
}
示例15: serialize
void MultiEffectBoosterVaccine::serialize(IArchive& ar, MultiEffectBoosterVaccine* obj)
{
MultiEffectVaccine::serialize( ar, obj );
MultiEffectBoosterVaccine& vaccine = *obj;
ar.labelElement("prime_acquire") & vaccine.prime_acquire;
ar.labelElement("prime_transmit") & vaccine.prime_transmit;
ar.labelElement("prime_mortality") & vaccine.prime_mortality;
ar.labelElement("boost_acquire") & vaccine.boost_acquire;
ar.labelElement("boost_transmit") & vaccine.boost_transmit;
ar.labelElement("boost_mortality") & vaccine.boost_mortality;
ar.labelElement("boost_threshold_acquire") & vaccine.boost_threshold_acquire;
ar.labelElement("boost_threshold_transmit") & vaccine.boost_threshold_transmit;
ar.labelElement("boost_threshold_mortality") & vaccine.boost_threshold_mortality;
}