join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
join::details::VariantHelper< Last > Struct Template Reference

helper class for recursive operations. More...

#include <variant.hpp>

Static Public Member Functions

static void destroy (std::size_t, void *data)
 external routine to destroy the object.
 
static void copy (std::size_t, const void *oldData, void *newData)
 external routine to copy one object to an other.
 
static void move (std::size_t, void *oldData, void *newData)
 external routine to move one object to an other.
 
static bool equal (std::size_t, const void *data, const void *otherData)
 external routine to compare if one object is equal to an other of same type.
 
template<typename T = Last, typename std::enable_if_t<!std::is_null_pointer< T >::value > * = nullptr>
static bool lower (std::size_t, const void *data, const void *otherData)
 external routine to compare if one object is lower than an other of the same type.
 
template<typename T = Last, typename std::enable_if_t< std::is_null_pointer< T >::value > * = nullptr>
static bool lower (std::size_t, const void *, const void *)
 external routine to compare if one object is lower than an other of the same type.
 

Detailed Description

template<typename Last>
struct join::details::VariantHelper< Last >

helper class for recursive operations.

Member Function Documentation

◆ copy()

template<typename Last >
static void join::details::VariantHelper< Last >::copy ( std::size_t ,
const void * oldData,
void * newData )
inlinestatic

external routine to copy one object to an other.

Parameters
oldIndexold object data type index.
oldDataold object storage pointer.
newDatanew object storage pointer.

◆ destroy()

template<typename Last >
static void join::details::VariantHelper< Last >::destroy ( std::size_t ,
void * data )
inlinestatic

external routine to destroy the object.

Parameters
indexobject data type index.
datastorage pointer.

◆ equal()

template<typename Last >
static bool join::details::VariantHelper< Last >::equal ( std::size_t ,
const void * data,
const void * otherData )
inlinestatic

external routine to compare if one object is equal to an other of same type.

Parameters
indexobject data type index.
datastorage pointer.
otherDataother storage pointer.
Returns
true if equal, false otherwise.

◆ lower() [1/2]

template<typename Last >
template<typename T = Last, typename std::enable_if_t< std::is_null_pointer< T >::value > * = nullptr>
static bool join::details::VariantHelper< Last >::lower ( std::size_t ,
const void * ,
const void *  )
inlinestatic

external routine to compare if one object is lower than an other of the same type.

Parameters
indexobject data type index.
datastorage pointer.
otherDataother storage pointer.
Returns
true if lower than, false otherwise.

◆ lower() [2/2]

template<typename Last >
template<typename T = Last, typename std::enable_if_t<!std::is_null_pointer< T >::value > * = nullptr>
static bool join::details::VariantHelper< Last >::lower ( std::size_t ,
const void * data,
const void * otherData )
inlinestatic

external routine to compare if one object is lower than an other of the same type.

Parameters
indexobject data type index.
datastorage pointer.
otherDataother storage pointer.
Returns
true if lower than, false otherwise.

◆ move()

template<typename Last >
static void join::details::VariantHelper< Last >::move ( std::size_t ,
void * oldData,
void * newData )
inlinestatic

external routine to move one object to an other.

Parameters
oldIndexold object data type index.
oldDataold object storage pointer.
newDatanew object storage pointer.

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