OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
CommonSnapshots.h File Reference
#include <cstring>
#include <algorithm>
#include <array>
#include <string>
#include <span>
#include <type_traits>
#include <deque>
#include <vector>
#include "Library/Binary/BinaryConcepts.h"
#include "Utility/Segment.h"
#include "Utility/IndexedArray.h"
#include "Utility/IndexedBitset.h"
#include "SnapshotConcepts.h"

Classes

struct  CastTag< From, To >
 
struct  SegmentTag< FirstIndex, LastIndex >
 
struct  ReverseBitOrderTag
 

Namespaces

namespace  tags
 

Functions

template<class T >
void snapshot (const T &src, T *dst)
 
template<class T >
void reconstruct (const T &src, T *dst)
 
template<class T1 , class T2 >
void snapshot (const T1 &src, T2 *dst, CastTag< T1, T2 >)
 
template<class T1 , class T2 >
void reconstruct (const T1 &src, T2 *dst, CastTag< T1, T2 >)
 
template<size_t N>
void snapshot (const std::string &src, std::array< char, N > *dst)
 
template<size_t N>
void reconstruct (const std::array< char, N > &src, std::string *dst)
 
template<ResizableContiguousContainer Src, ResizableContiguousContainer Dst, class... Tags>
requires DifferentElementTypes<Src, Dst>
void snapshot (const Src &src, Dst *dst, const Tags &... tags)
 
template<ResizableContiguousContainer Src, ResizableContiguousContainer Dst, class... Tags>
requires DifferentElementTypes<Src, Dst>
void reconstruct (const Src &src, Dst *dst, const Tags &... tags)
 
template<class T1 , class T2 , class... Tags>
void snapshot (const std::deque< T1 > &src, std::vector< T2 > *dst, const Tags &... tags)
 
template<class T1 , class T2 , class... Tags>
void reconstruct (const std::vector< T1 > &src, std::deque< T2 > *dst, const Tags &... tags)
 
template<class T1 , size_t N1, class T2 , size_t N2, class... Tags>
requires (!std::is_same_v<T1, T2>)
void snapshot (const std::array< T1, N1 > &src, std::array< T2, N2 > *dst, const Tags &... tags)
 
template<class T1 , size_t N1, class T2 , size_t N2, class... Tags>
requires (!std::is_same_v<T1, T2>)
void reconstruct (const std::array< T1, N1 > &src, std::array< T2, N2 > *dst, const Tags &... tags)
 
template<class T1 , size_t N, class T2 , auto L, auto H, class... Tags>
void snapshot (const IndexedArray< T2, L, H > &src, std::array< T1, N > *dst, const Tags &... tags)
 
template<class T1 , size_t N, class T2 , auto L, auto H, class... Tags>
void reconstruct (const std::array< T1, N > &src, IndexedArray< T2, L, H > *dst, const Tags &... tags)
 
template<class T1 , size_t N, class T2 , auto L, auto H, auto LL, auto HH>
void snapshot (const IndexedArray< T2, L, H > &src, std::array< T1, N > *dst, SegmentTag< LL, HH > tag)
 
template<class T1 , size_t N, class T2 , auto L, auto H, auto LL, auto HH>
void reconstruct (const std::array< T1, N > &src, IndexedArray< T2, L, H > *dst, SegmentTag< LL, HH > tag)
 
template<size_t N, auto L, auto H>
static void snapshot (const IndexedBitset< L, H > &src, std::array< uint8_t, N > *dst, ReverseBitOrderTag)
 
template<size_t N, auto L, auto H>
static void reconstruct (const std::array< uint8_t, N > &src, IndexedBitset< L, H > *dst, ReverseBitOrderTag)
 

Variables

template<class From , class To >
constexpr CastTag< From, To > tags::cast
 
template<auto First, auto Last>
constexpr SegmentTag< First, Last > tags::segment
 
constexpr ReverseBitOrderTag tags::reverseBits
 

Function Documentation

◆ reconstruct() [1/9]

template<ResizableContiguousContainer Src, ResizableContiguousContainer Dst, class... Tags>
requires DifferentElementTypes<Src, Dst>
void reconstruct ( const Src &  src,
Dst *  dst,
const Tags &...  tags 
)

◆ reconstruct() [2/9]

template<size_t N>
void reconstruct ( const std::array< char, N > &  src,
std::string *  dst 
)

◆ reconstruct() [3/9]

template<class T1 , size_t N, class T2 , auto L, auto H, class... Tags>
void reconstruct ( const std::array< T1, N > &  src,
IndexedArray< T2, L, H > *  dst,
const Tags &...  tags 
)

◆ reconstruct() [4/9]

template<class T1 , size_t N, class T2 , auto L, auto H, auto LL, auto HH>
void reconstruct ( const std::array< T1, N > &  src,
IndexedArray< T2, L, H > *  dst,
SegmentTag< LL, HH >  tag 
)

◆ reconstruct() [5/9]

template<class T1 , size_t N1, class T2 , size_t N2, class... Tags>
requires (!std::is_same_v<T1, T2>)
void reconstruct ( const std::array< T1, N1 > &  src,
std::array< T2, N2 > *  dst,
const Tags &...  tags 
)

◆ reconstruct() [6/9]

template<size_t N, auto L, auto H>
static void reconstruct ( const std::array< uint8_t, N > &  src,
IndexedBitset< L, H > *  dst,
ReverseBitOrderTag   
)
static

◆ reconstruct() [7/9]

template<class T1 , class T2 , class... Tags>
void reconstruct ( const std::vector< T1 > &  src,
std::deque< T2 > *  dst,
const Tags &...  tags 
)

◆ reconstruct() [8/9]

template<class T >
void reconstruct ( const T &  src,
T *  dst 
)

◆ reconstruct() [9/9]

template<class T1 , class T2 >
void reconstruct ( const T1 &  src,
T2 *  dst,
CastTag< T1, T2 >   
)

◆ snapshot() [1/9]

template<class T1 , size_t N, class T2 , auto L, auto H, class... Tags>
void snapshot ( const IndexedArray< T2, L, H > &  src,
std::array< T1, N > *  dst,
const Tags &...  tags 
)

◆ snapshot() [2/9]

template<class T1 , size_t N, class T2 , auto L, auto H, auto LL, auto HH>
void snapshot ( const IndexedArray< T2, L, H > &  src,
std::array< T1, N > *  dst,
SegmentTag< LL, HH >  tag 
)

◆ snapshot() [3/9]

template<size_t N, auto L, auto H>
static void snapshot ( const IndexedBitset< L, H > &  src,
std::array< uint8_t, N > *  dst,
ReverseBitOrderTag   
)
static

◆ snapshot() [4/9]

template<ResizableContiguousContainer Src, ResizableContiguousContainer Dst, class... Tags>
requires DifferentElementTypes<Src, Dst>
void snapshot ( const Src &  src,
Dst *  dst,
const Tags &...  tags 
)

◆ snapshot() [5/9]

template<class T1 , size_t N1, class T2 , size_t N2, class... Tags>
requires (!std::is_same_v<T1, T2>)
void snapshot ( const std::array< T1, N1 > &  src,
std::array< T2, N2 > *  dst,
const Tags &...  tags 
)

◆ snapshot() [6/9]

template<class T1 , class T2 , class... Tags>
void snapshot ( const std::deque< T1 > &  src,
std::vector< T2 > *  dst,
const Tags &...  tags 
)

◆ snapshot() [7/9]

template<size_t N>
void snapshot ( const std::string &  src,
std::array< char, N > *  dst 
)

◆ snapshot() [8/9]

template<class T >
void snapshot ( const T &  src,
T *  dst 
)

◆ snapshot() [9/9]

template<class T1 , class T2 >
void snapshot ( const T1 &  src,
T2 *  dst,
CastTag< T1, T2 >   
)