21 #include <bsoncxx/stdx/string_view.hpp>
23 #include <bsoncxx/config/prelude.hpp>
26 BSONCXX_INLINE_NAMESPACE_BEGIN
38 class BSONCXX_API
oid {
40 static constexpr std::size_t k_oid_length = 12;
57 explicit oid(
const char* bytes, std::size_t len);
68 explicit oid(
const bsoncxx::stdx::string_view& str);
82 static std::size_t
size() {
93 friend BSONCXX_API
bool BSONCXX_CALL operator<(
const oid& lhs,
const oid& rhs);
94 friend BSONCXX_API
bool BSONCXX_CALL operator>(
const oid& lhs,
const oid& rhs);
95 friend BSONCXX_API
bool BSONCXX_CALL operator<=(
const oid& lhs,
const oid& rhs);
96 friend BSONCXX_API
bool BSONCXX_CALL operator>=(
const oid& lhs,
const oid& rhs);
97 friend BSONCXX_API
bool BSONCXX_CALL operator==(
const oid& lhs,
const oid& rhs);
98 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
const oid& lhs,
const oid& rhs);
108 std::time_t get_time_t()
const;
115 const char* bytes()
const;
118 friend BSONCXX_PRIVATE
int oid_compare(
const oid& lhs,
const oid& rhs);
120 std::array<char, k_oid_length> _bytes;
123 BSONCXX_INLINE_NAMESPACE_END
126 #include <bsoncxx/config/postlude.hpp>