本文整理汇总了C++中osmium::OSMObject::timestamp方法的典型用法代码示例。如果您正苦于以下问题:C++ OSMObject::timestamp方法的具体用法?C++ OSMObject::timestamp怎么用?C++ OSMObject::timestamp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osmium::OSMObject
的用法示例。
在下文中一共展示了OSMObject::timestamp方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write_meta
void write_meta(const osmium::OSMObject& object) {
output_int(object.id());
if (m_options.add_metadata) {
*m_out += ' ';
write_field_int('v', object.version());
*m_out += " d";
*m_out += (object.visible() ? 'V' : 'D');
*m_out += ' ';
write_field_int('c', object.changeset());
*m_out += ' ';
write_field_timestamp('t', object.timestamp());
*m_out += ' ';
write_field_int('i', object.uid());
*m_out += " u";
append_encoded_string(object.user());
}
write_tags(object.tags());
}
示例2: write_meta
void write_meta(const osmium::OSMObject& object) {
output_formatted("%" PRId64 " v%d d", object.id(), object.version());
*m_out += (object.visible() ? 'V' : 'D');
output_formatted(" c%d t", object.changeset());
*m_out += object.timestamp().to_iso();
output_formatted(" i%d u", object.uid());
append_encoded_string(object.user());
*m_out += " T";
bool first = true;
for (const auto& tag : object.tags()) {
if (first) {
first = false;
} else {
*m_out += ',';
}
append_encoded_string(tag.key());
*m_out += '=';
append_encoded_string(tag.value());
}
}
示例3: operator
bool operator()(const osmium::OSMObject& lhs, const osmium::OSMObject& rhs) const noexcept {
return const_tie(lhs.type(), lhs.id() < 0, lhs.positive_id(), rhs.version(), rhs.timestamp()) <
const_tie(rhs.type(), rhs.id() < 0, rhs.positive_id(), lhs.version(), lhs.timestamp());
}
示例4: last
/**
* Return the timestamp when the current version of the object is
* not valid any more, ie the time when the next version of the object
* is valid. If this is the last version of the object, this will
* return a special "end of time" timestamp that is guaranteed to
* be larger than any normal timestamp.
*/
const osmium::Timestamp end_time() const noexcept {
return last() ? osmium::end_of_time() : m_next->timestamp();
}
示例5:
const osmium::Timestamp start_time() const noexcept {
return m_curr->timestamp();
}
示例6: last
const osmium::Timestamp end_time() const {
return last() ? osmium::Timestamp() : m_next->timestamp();
}