21 #include <bsoncxx/stdx/string_view.hpp>
23 #include <bsoncxx/config/prelude.hpp>
26 BSONCXX_INLINE_NAMESPACE_BEGIN
38 class BSONCXX_API
oid {
75 explicit oid(
const char* bytes, std::size_t len);
86 explicit oid(
const bsoncxx::stdx::string_view& str);
93 std::string to_string()
const;
102 friend BSONCXX_API
bool BSONCXX_CALL operator<(
const oid& lhs,
const oid& rhs);
103 friend BSONCXX_API
bool BSONCXX_CALL operator>(
const oid& lhs,
const oid& rhs);
104 friend BSONCXX_API
bool BSONCXX_CALL operator<=(
const oid& lhs,
const oid& rhs);
105 friend BSONCXX_API
bool BSONCXX_CALL operator>=(
const oid& lhs,
const oid& rhs);
106 friend BSONCXX_API
bool BSONCXX_CALL operator==(
const oid& lhs,
const oid& rhs);
107 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
const oid& lhs,
const oid& rhs);
120 BSONCXX_DEPRECATED
explicit operator bool()
const;
127 std::time_t get_time_t()
const;
134 const char* bytes()
const;
137 friend BSONCXX_PRIVATE
int oid_compare(
const oid& lhs,
const oid& rhs);
139 std::array<char, 12> _bytes;
142 BSONCXX_INLINE_NAMESPACE_END
145 #include <bsoncxx/config/postlude.hpp>
Represents a MongoDB ObjectId.
Definition: oid.hpp:38
Definition: element.hpp:24