zookeeper-cpp
ZooKeeper Client for C++
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
zk::basic_version< TReal > Struct Template Reference

Base type for version types. More...

#include <zk/types.hpp>

+ Inheritance diagram for zk::basic_version< TReal >:

Static Public Member Functions

static constexpr TReal invalid ()
 An invalid version specifier. More...
 
static constexpr TReal any ()
 When specified in an operation, this version specifier will always pass. More...
 

Additional Inherited Members

- Public Types inherited from zk::strong_id< TReal, std::int32_t >
using value_type = std::int32_t
 The representation type of this ID. More...
 
- Public Member Functions inherited from zk::strong_id< TReal, std::int32_t >
 strong_id () noexcept=default
 Default construct the ID. More...
 
constexpr strong_id (value_type value) noexcept
 Construct this instance with the given value. More...
 
constexpr value_type get () const noexcept
 Get the value of this ID. More...
 
constexpr operator value_type () noexcept
 Get the value of this ID. More...
 
TReal & operator++ ()
 
TReal operator++ (int)
 
TReal & operator-- ()
 
TReal operator-- (int)
 
- Public Attributes inherited from zk::strong_id< TReal, std::int32_t >
value_type value
 Underlying value of this ID. More...
 

Detailed Description

template<typename TReal>
struct zk::basic_version< TReal >

Base type for version types.

These are distinct so we can emit a compilation error on attempts to use the incorrect version type (for example, client::set_acl does a check on acl_version instead of the standard version).

See also
version
acl_version
child_version

Definition at line 140 of file types.hpp.

Member Function Documentation

template<typename TReal>
static constexpr TReal zk::basic_version< TReal >::any ( )
inlinestatic

When specified in an operation, this version specifier will always pass.

It is the equivalent to not performing a version check.

Definition at line 150 of file types.hpp.

template<typename TReal>
static constexpr TReal zk::basic_version< TReal >::invalid ( )
inlinestatic

An invalid version specifier.

This will never be returned by the database and will always be rejected in commit operations. This is a good value to use as a placeholder when you are searching for the proper version.

Definition at line 145 of file types.hpp.


The documentation for this struct was generated from the following file: