本文整理汇总了C++中Mapping::write方法的典型用法代码示例。如果您正苦于以下问题:C++ Mapping::write方法的具体用法?C++ Mapping::write怎么用?C++ Mapping::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mapping
的用法示例。
在下文中一共展示了Mapping::write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: store
void PoseSeq::store(Mapping& archive, const BodyPtr body) const
{
archive.write("type", "PoseSeq");
archive.write("name", name(), DOUBLE_QUOTED);
archive.write("targetBody", body->name(), DOUBLE_QUOTED);
Listing& refsNode = *archive.createListing("refs");
for(PoseRefList::const_iterator p = refs.begin(); p != refs.end(); ++p){
const PoseRef& ref = *p;
MappingPtr refNode = refsNode.newMapping();
refNode->write("time", ref.time());
if(ref.maxTransitionTime() > 0.0){
refNode->write("maxTransitionTime", ref.maxTransitionTime());
}
const string& name = ref.name();
if((storedNames.find(name) == storedNames.end() /* && !ref.isExternalReference()*/) ||
name.empty()){
const_cast<PoseSeq*>(this)->storedNames.insert(name);
MappingPtr childNode = refNode->createMapping("refer");
ref.poseUnit()->store(*childNode, body);
} else {
refNode->write("refer", name, DOUBLE_QUOTED);
}
}
}
示例2: store
bool MovieRecorderImpl::store(Mapping& archive)
{
if(targetView){
archive.write("target", targetView->name());
}
archive.write("recordingMode", recordingMode.selectedSymbol());
return dialog->store(archive);
}
示例3: storeState
bool Task::storeState(AbstractTaskSequencer* sequencer, Mapping& archive)
{
archive.write("phaseIndex", sequencer->currentPhaseIndex());
return true;
}