21 #include <bsoncxx/stdx/string_view.hpp> 23 #include <bsoncxx/config/prelude.hpp> 26 BSONCXX_INLINE_NAMESPACE_BEGIN
38 class BSONCXX_API
oid {
52 BSONCXX_DEPRECATED
static const init_tag_t init_tag;
79 explicit oid(
const char* bytes, std::size_t len);
90 explicit oid(
const bsoncxx::stdx::string_view& str);
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);
108 friend BSONCXX_API
bool BSONCXX_CALL operator<=(
const oid& lhs,
const oid& rhs);
109 friend BSONCXX_API
bool BSONCXX_CALL operator>=(
const oid& lhs,
const oid& rhs);
110 friend BSONCXX_API
bool BSONCXX_CALL operator==(
const oid& lhs,
const oid& rhs);
111 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
const oid& lhs,
const oid& rhs);
124 BSONCXX_DEPRECATED
explicit operator bool()
const;
125 bool operator_bool_deprecated()
const;
132 std::time_t get_time_t()
const;
139 const char* bytes()
const;
142 friend BSONCXX_PRIVATE
int oid_compare(
const oid& lhs,
const oid& rhs);
144 std::array<char, 12> _bytes;
147 BSONCXX_INLINE_NAMESPACE_END
150 #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