Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed May 4, 2024
1 parent 64d070b commit 44cd94e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions doc/uuid/design_notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion doc/uuid/name_generator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion doc/uuid/name_generator_md5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/uuid/name_generator_sha1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/uuid/nil_generator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct nil_generator
uuid nil_uuid() noexcept;
}} //namespace boost::uuids
}} // namespace boost::uuids
----

=== nil_generator
Expand Down
2 changes: 1 addition & 1 deletion doc/uuid/string_generator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct string_generator
uuid operator()( CharIterator begin, CharIterator end ) const;
};
}} //namespace boost::uuids
}} // namespace boost::uuids
----

=== string_generator
Expand Down
15 changes: 11 additions & 4 deletions doc/uuid/uuid_clock.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -48,15 +52,18 @@ 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`.

=== 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`.
Expand Down

0 comments on commit 44cd94e

Please sign in to comment.