pstore2
Public Types | Public Member Functions | Static Public Attributes | List of all members
pstore::details::descriptor< DescriptorTraits > Class Template Reference

DescriptorTraits is a traits structure of the following form: More...

#include <descriptor.hpp>

Public Types

using value_type = typename DescriptorTraits::type
 
using error_type = typename DescriptorTraits::error_type
 

Public Member Functions

constexpr descriptor (DescriptorTraits const traits=DescriptorTraits()) noexcept
 
constexpr descriptor (value_type const fd, DescriptorTraits const traits=DescriptorTraits()) noexcept
 
 descriptor (descriptor &&rhs) noexcept
 
 descriptor (descriptor const &)=delete
 
descriptoroperator= (descriptor const &)=delete
 
descriptoroperator= (descriptor &&rhs) noexcept
 
bool operator== (descriptor const &rhs) const noexcept
 
bool operator!= (descriptor const &rhs) const noexcept
 
bool operator< (descriptor const &rhs) const noexcept
 
bool valid () const noexcept
 
value_type native_handle () const noexcept
 
value_type release () noexcept
 
void reset (value_type r=invalid) noexcept
 

Static Public Attributes

static constexpr value_type invalid = DescriptorTraits::invalid
 
static constexpr error_type error = DescriptorTraits::error
 

Detailed Description

template<typename DescriptorTraits>
class pstore::details::descriptor< DescriptorTraits >

DescriptorTraits is a traits structure of the following form:

struct descriptor_traits { using type = ...; using error_type = ...; std::function <bool (type)> is_valid = ...; std::function <void (type)> close = ...; static constexpr type const invalid = ...; static constexpr int const error = ...; };

(The use of std::function<> is for exposition only: the implementation simply provides a function with a similar signature.)


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