本文整理汇总了C++中Mission::getMap方法的典型用法代码示例。如果您正苦于以下问题:C++ Mission::getMap方法的具体用法?C++ Mission::getMap怎么用?C++ Mission::getMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mission
的用法示例。
在下文中一共展示了Mission::getMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: missionToMessage
semantic_map_msgs::Mission MessageConversions::missionToMessage(const
Mission& mission) const {
semantic_map_msgs::Mission message = entityToMessage<
semantic_map_msgs::Mission>(mission);
message.ontology = ontologyToMessage(mission.getOntology());
message.map = mission.getMap();
boost::unordered_multimap<std::string, Property> properties = mission.
getProperties();
message.tasks.reserve(mission.getNumTasks());
for (std::list<Task>::const_iterator it = mission.begin();
it != mission.end(); ++it) {
message.tasks.push_back(taskToMessage(*it));
boost::unordered_multimap<std::string, Property> taskProperties =
it->getProperties();
for (boost::unordered_multimap<std::string, Property>::const_iterator
jt = taskProperties.begin(); jt != taskProperties.end(); ++jt)
properties.insert(*jt);
}
message.object_properties.reserve(properties.size());
message.data_properties.reserve(properties.size());
for (boost::unordered_multimap<std::string, Property>::const_iterator
it = properties.begin(); it != properties.end(); ++it) {
if (it->second.isObjectProperty())
message.object_properties.push_back(objectPropertyToMessage(
it->second));
else
message.data_properties.push_back(dataPropertyToMessage(it->second));
}
return message;
}