Subversion
|
A revision, see svn_opt_revision_t. More...
#include <svnxx/revision.hpp>
Public Types | |
enum | number : svn_revnum_t { number::invalid = SVN_INVALID_REVNUM } |
Revision number type. More... | |
enum | kind : std::int8_t { unspecified = svn_opt_revision_unspecified, number = svn_opt_revision_number, date = svn_opt_revision_date, committed = svn_opt_revision_committed, previous = svn_opt_revision_previous, base = svn_opt_revision_base, working = svn_opt_revision_working, head = svn_opt_revision_head } |
Revision kind discriminator (see svn_opt_revision_kind). | |
template<typename Duration > | |
using | time = std::chrono::time_point< std::chrono::system_clock, Duration > |
Revision by date/time uses the system clock. | |
using | usec = std::chrono::microseconds |
The resolution of the stored date/time. | |
Public Member Functions | |
revision () noexcept | |
Default constructor. More... | |
revision (kind revkind) | |
Construct a revision of the given kind. More... | |
revision (number revnum_) noexcept | |
Construct a numbered revision. More... | |
template<typename D > | |
revision (time< D > time_) noexcept | |
Construct a dated revision from a system clock time point. More... | |
revision & | operator= (const revision &that) |
Assignment operator. More... | |
kind | get_kind () const noexcept |
Return the revision kind. | |
number | get_number () const |
Return the revision number. More... | |
template<typename D > | |
time< D > | get_date () const |
Return the revision date/time as a system clock time point. More... | |
Related Functions | |
(Note that these are not member functions.) | |
using | revnum = revision::number |
revision::number alias for convenience. | |
bool | operator== (const revision &a, const revision &b) |
Equality comparison. | |
bool | operator!= (const revision &a, const revision &b) |
Inequality comparison. | |
tristate | operator< (const revision &a, const revision &b) |
Ordering: less-than (operator < ). More... | |
tristate | operator> (const revision &a, const revision &b) |
Ordering: greater-than (operator > ). More... | |
tristate | operator<= (const revision &a, const revision &b) |
Ordering: less-or-equal (operator <= ). More... | |
tristate | operator>= (const revision &a, const revision &b) |
Ordering: greater-or-equal (operator >= ). More... | |
A revision, see svn_opt_revision_t.
The revision
can represent a revision number, a point in time in the repository or a property of the working copy or repository node (see revision::kind).
Definition at line 48 of file revision.hpp.
|
strong |
Revision number type.
Enumerator | |
---|---|
invalid | Invalid revision number. |
Definition at line 54 of file revision.hpp.
|
inlinenoexcept |
Default constructor.
Definition at line 90 of file revision.hpp.
Referenced by operator=().
|
inlineexplicit |
Construct a revision of the given kind.
kind
value except kind::number or kind::date, which require additional parameters and therefore have their own constructors. std::invalid_argument | if the revkind value precondition is not met. |
Definition at line 103 of file revision.hpp.
|
inlineexplicitnoexcept |
Construct a numbered revision.
Definition at line 114 of file revision.hpp.
|
inlineexplicitnoexcept |
Construct a dated revision from a system clock time point.
Definition at line 124 of file revision.hpp.
|
inline |
Return the revision date/time as a system clock time point.
std::logic_error | if the precondition is not met. |
Definition at line 167 of file revision.hpp.
Referenced by operator<(), operator==(), and operator>().
|
inline |
Return the revision number.
std::logic_error | if the precondition is not met. |
Definition at line 154 of file revision.hpp.
Referenced by operator<(), operator==(), and operator>().
Assignment operator.
Uses in-place destruction/construction to maintain the immutability of the revision kind.
Definition at line 134 of file revision.hpp.
References revision().
Ordering: less-than (operator <
).
tristate
result of comparing two revision
values, according to the following table: < | number | date | |
---|---|---|---|
number | a.get_number() < b.get_number() | ||
date | a.get_date() < b.get_date() | ||
Definition at line 248 of file revision.hpp.
References get_date(), get_kind(), get_number(), and apache::subversion::svnxx::tristate::unknown().
Ordering: less-or-equal (operator <=
).
tristate
result of comparing two revision
values, according to the following table: <= | number | date | |
---|---|---|---|
number | a.get_number() <= b.get_number() | ||
date | a.get_date() <= b.get_date() | ||
a.get_kind() == b.get_kind()
. Definition at line 339 of file revision.hpp.
Ordering: greater-than (operator >
).
tristate
result of comparing two revision
values, according to the following table: > | number | date | |
---|---|---|---|
number | a.get_number() > b.get_number() | ||
date | a.get_date() > b.get_date() | ||
Definition at line 293 of file revision.hpp.
References get_date(), get_kind(), get_number(), and apache::subversion::svnxx::tristate::unknown().
Ordering: greater-or-equal (operator >=
).
tristate
result of comparing two revision
values, according to the following table: >= | number | date | |
---|---|---|---|
number | a.get_number() >= b.get_number() | ||
date | a.get_date() >= b.get_date() | ||
a.get_kind() == b.get_kind()
. Definition at line 377 of file revision.hpp.