21 #include <bsoncxx/stdx/string_view.hpp> 23 #include <bsoncxx/config/prelude.hpp> 26 BSONCXX_INLINE_NAMESPACE_BEGIN
38 class BSONCXX_API
oid {
55 explicit oid(
const char* bytes, std::size_t len);
66 explicit oid(
const bsoncxx::stdx::string_view& str);
82 friend BSONCXX_API
bool BSONCXX_CALL operator<(
const oid& lhs,
const oid& rhs);
83 friend BSONCXX_API
bool BSONCXX_CALL operator>(
const oid& lhs,
const oid& rhs);
84 friend BSONCXX_API
bool BSONCXX_CALL operator<=(
const oid& lhs,
const oid& rhs);
85 friend BSONCXX_API
bool BSONCXX_CALL operator>=(
const oid& lhs,
const oid& rhs);
86 friend BSONCXX_API
bool BSONCXX_CALL operator==(
const oid& lhs,
const oid& rhs);
87 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
const oid& lhs,
const oid& rhs);
97 std::time_t get_time_t()
const;
104 const char* bytes()
const;
107 friend BSONCXX_PRIVATE
int oid_compare(
const oid& lhs,
const oid& rhs);
109 std::array<char, 12> _bytes;
112 BSONCXX_INLINE_NAMESPACE_END
115 #include <bsoncxx/config/postlude.hpp> Represents a MongoDB ObjectId.
Definition: oid.hpp:38
std::string to_string(type rhs)
Returns a stringification of the given type.
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24