mirror of
https://github.com/boostorg/uuid.git
synced 2026-01-19 04:42:16 +00:00
Update documentation
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
|
||||
:idprefix: design_notes_
|
||||
|
||||
The document, http://www.itu.int/ITU-T/studygroups/com17/oid/X.667-E.pdf, was used to design and implement the *boost::uuids::uuid* struct.
|
||||
The document http://www.itu.int/ITU-T/studygroups/com17/oid/X.667-E.pdf was used to design and implement the `uuid` struct.
|
||||
|
||||
All functions are re-entrant. Classes are as thread-safe as an int. That is an instance can not be shared between threads without proper synchronization.
|
||||
All functions are re-entrant. Classes are as thread-safe as an int. That is an instance cannot be shared between threads without proper synchronization.
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace uuids {
|
||||
using name_generator = name_generator_sha1;
|
||||
using name_generator_latest = name_generator_sha1;
|
||||
|
||||
}} //namespace boost::uuids
|
||||
}} // namespace boost::uuids
|
||||
----
|
||||
|
||||
This header makes `name_generator_sha1` and `name_generator_md5` available and declares the compatibility aliases `name_generator` and `name_generator_latest`.
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
uuid operator()( void const* buffer, std::size_t byte_count ) const noexcept;
|
||||
};
|
||||
|
||||
}} //namespace boost::uuids
|
||||
}} // namespace boost::uuids
|
||||
----
|
||||
|
||||
=== name_generator_md5
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
uuid operator()( void const* buffer, std::size_t byte_count ) const noexcept;
|
||||
};
|
||||
|
||||
}} //namespace boost::uuids
|
||||
}} // namespace boost::uuids
|
||||
----
|
||||
|
||||
=== name_generator_sha1
|
||||
|
||||
@@ -18,7 +18,7 @@ struct nil_generator
|
||||
|
||||
uuid nil_uuid() noexcept;
|
||||
|
||||
}} //namespace boost::uuids
|
||||
}} // namespace boost::uuids
|
||||
----
|
||||
|
||||
=== nil_generator
|
||||
|
||||
@@ -24,7 +24,7 @@ struct string_generator
|
||||
uuid operator()( CharIterator begin, CharIterator end ) const;
|
||||
};
|
||||
|
||||
}} //namespace boost::uuids
|
||||
}} // namespace boost::uuids
|
||||
----
|
||||
|
||||
=== string_generator
|
||||
|
||||
@@ -23,8 +23,12 @@ public:
|
||||
|
||||
static time_point now() noexcept;
|
||||
|
||||
static time_point from_sys( std::chrono::system_clock::time_point const& tp ) noexcept;
|
||||
static std::chrono::system_clock::time_point to_sys( time_point const& tp ) noexcept;
|
||||
template<class Duration>
|
||||
static time_point from_sys(
|
||||
std::chrono::time_point<std::chrono::system_clock, Duration> const& tp ) noexcept;
|
||||
|
||||
static std::chrono::time_point<std::chrono::system_clock, duration>
|
||||
to_sys( time_point const& tp ) noexcept;
|
||||
|
||||
static time_point from_timestamp( std::uint64_t timestamp ) noexcept;
|
||||
static std::uint64_t to_timestamp( time_point const& tp ) noexcept;
|
||||
@@ -48,7 +52,9 @@ Returns: :: The current system time (`std::chrono::system_clock::now()`, convert
|
||||
=== from_sys
|
||||
|
||||
```
|
||||
static time_point from_sys( std::chrono::system_clock::time_point const& tp ) noexcept;
|
||||
template<class Duration>
|
||||
static time_point from_sys(
|
||||
std::chrono::time_point<std::chrono::system_clock, Duration> const& tp ) noexcept;
|
||||
```
|
||||
|
||||
Returns: :: The `uuid_clock::time_point` corresponding to `tp`.
|
||||
@@ -56,7 +62,8 @@ Returns: :: The `uuid_clock::time_point` corresponding to `tp`.
|
||||
=== to_sys
|
||||
|
||||
```
|
||||
static std::chrono::system_clock::time_point to_sys( time_point const& tp ) noexcept;
|
||||
static std::chrono::time_point<std::chrono::system_clock, duration>
|
||||
to_sys( time_point const& tp ) noexcept;
|
||||
```
|
||||
|
||||
Returns: :: The `std::chrono::system_clock::time_point` corresponding to `tp`.
|
||||
|
||||
Reference in New Issue
Block a user