Kagome
Polkadot Runtime Engine in C++17
kagome::primitives::Strobe Class Referencefinal

#include <strobe.hpp>

Collaboration diagram for kagome::primitives::Strobe:

Public Member Functions

 Strobe ()
 
 Strobe (const Strobe &other)
 
Strobeoperator= (const Strobe &other)
 
 Strobe (Strobe &&)=delete
 
Strobeoperator= (Strobe &&)=delete
 
template<typename T , size_t N>
void initialize (const T(&label)[N])
 
template<bool kMore, typename T , size_t N>
void ad (const T(&src)[N])
 
template<bool kMore, typename T , size_t N>
void metaAd (const T(&label)[N])
 
template<bool kMore, typename T , size_t N>
void prf (T(&data)[N])
 
template<bool kMore, typename T , size_t N>
void key (const T(&data)[N])
 
auto data ()
 
auto data () const
 

Private Types

using Flags = uint8_t
 
using Position = uint8_t
 

Private Member Functions

template<typename T , size_t kOffset = 0ull>
constexpr T * as ()
 
template<typename T , size_t kOffset = 0ull>
constexpr const T * as () const
 
template<typename T >
T * as (Position offset)
 
template<size_t kOffset, typename T , size_t N>
void load (const T(&data)[N])
 
template<typename T , size_t N>
void absorb (const T(&src)[N])
 
template<typename T , size_t N>
void overwrite (const T(&src)[N])
 
template<typename T , size_t N>
void squeeze (T(&src)[N])
 
template<bool kMore, Flags kFlags>
void beginOp ()
 
void runF ()
 

Static Private Member Functions

template<typename T >
static constexpr size_t count ()
 

Private Attributes

uint8_t raw_data [kBufferSize+kAlignment-1ull+3ull]
 
uint8_t *const buffer_
 
Positioncurrent_position_
 
Positionbegin_position_
 
Flagscurrent_state_
 

Static Private Attributes

static constexpr size_t kBufferSize = 200ull
 
static constexpr size_t kAlignment = 8ull
 
static constexpr uint8_t kStrobeR = 166
 
static constexpr Flags kFlag_NU = 0x00
 
static constexpr Flags kFlag_I = 0x01
 
static constexpr Flags kFlag_A = 0x02
 
static constexpr Flags kFlag_C = 0x04
 
static constexpr Flags kFlag_T = 0x08
 
static constexpr Flags kFlag_M = 0x10
 
static constexpr Flags kFlag_K = 0x20
 

Detailed Description

C++ implementation(Alexander 'iceseer' Lednev) of https://strobe.sourceforge.io/

Definition at line 27 of file strobe.hpp.

Member Typedef Documentation

using kagome::primitives::Strobe::Flags = uint8_t
private

Definition at line 32 of file strobe.hpp.

using kagome::primitives::Strobe::Position = uint8_t
private

Definition at line 33 of file strobe.hpp.

Constructor & Destructor Documentation

kagome::primitives::Strobe::Strobe ( )
inline

Definition at line 143 of file strobe.hpp.

kagome::primitives::Strobe::Strobe ( const Strobe other)
inline

Definition at line 150 of file strobe.hpp.

kagome::primitives::Strobe::Strobe ( Strobe &&  )
delete

Member Function Documentation

template<typename T , size_t N>
void kagome::primitives::Strobe::absorb ( const T(&)  src[N])
inlineprivate

Definition at line 82 of file strobe.hpp.

template<bool kMore, typename T , size_t N>
void kagome::primitives::Strobe::ad ( const T(&)  src[N])
inline

Definition at line 206 of file strobe.hpp.

template<typename T , size_t kOffset = 0ull>
constexpr T* kagome::primitives::Strobe::as ( )
inlineprivate

Definition at line 50 of file strobe.hpp.

template<typename T , size_t kOffset = 0ull>
constexpr const T* kagome::primitives::Strobe::as ( ) const
inlineprivate

Definition at line 56 of file strobe.hpp.

template<typename T >
T* kagome::primitives::Strobe::as ( Position  offset)
inlineprivate

Definition at line 62 of file strobe.hpp.

template<bool kMore, Flags kFlags>
void kagome::primitives::Strobe::beginOp ( )
inlineprivate

Definition at line 113 of file strobe.hpp.

template<typename T >
static constexpr size_t kagome::primitives::Strobe::count ( )
inlinestaticprivate

Definition at line 68 of file strobe.hpp.

auto kagome::primitives::Strobe::data ( )
inline

Definition at line 229 of file strobe.hpp.

auto kagome::primitives::Strobe::data ( ) const
inline

Definition at line 233 of file strobe.hpp.

template<typename T , size_t N>
void kagome::primitives::Strobe::initialize ( const T(&)  label[N])
inline

Definition at line 167 of file strobe.hpp.

template<bool kMore, typename T , size_t N>
void kagome::primitives::Strobe::key ( const T(&)  data[N])
inline

Definition at line 224 of file strobe.hpp.

template<size_t kOffset, typename T , size_t N>
void kagome::primitives::Strobe::load ( const T(&)  data[N])
inlineprivate

Definition at line 76 of file strobe.hpp.

template<bool kMore, typename T , size_t N>
void kagome::primitives::Strobe::metaAd ( const T(&)  label[N])
inline

Definition at line 212 of file strobe.hpp.

Strobe& kagome::primitives::Strobe::operator= ( const Strobe other)
inline

Definition at line 156 of file strobe.hpp.

Strobe& kagome::primitives::Strobe::operator= ( Strobe &&  )
delete
template<typename T , size_t N>
void kagome::primitives::Strobe::overwrite ( const T(&)  src[N])
inlineprivate

Definition at line 92 of file strobe.hpp.

template<bool kMore, typename T , size_t N>
void kagome::primitives::Strobe::prf ( T(&)  data[N])
inline

Definition at line 218 of file strobe.hpp.

void kagome::primitives::Strobe::runF ( )
inlineprivate

Definition at line 132 of file strobe.hpp.

template<typename T , size_t N>
void kagome::primitives::Strobe::squeeze ( T(&)  src[N])
inlineprivate

Definition at line 102 of file strobe.hpp.

Member Data Documentation

Position& kagome::primitives::Strobe::begin_position_
private

Definition at line 46 of file strobe.hpp.

uint8_t* const kagome::primitives::Strobe::buffer_
private

Definition at line 44 of file strobe.hpp.

Position& kagome::primitives::Strobe::current_position_
private

Definition at line 45 of file strobe.hpp.

Flags& kagome::primitives::Strobe::current_state_
private

Definition at line 47 of file strobe.hpp.

constexpr size_t kagome::primitives::Strobe::kAlignment = 8ull
staticprivate

Definition at line 29 of file strobe.hpp.

constexpr size_t kagome::primitives::Strobe::kBufferSize = 200ull
staticprivate

Definition at line 28 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_A = 0x02
staticprivate

Definition at line 37 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_C = 0x04
staticprivate

Definition at line 38 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_I = 0x01
staticprivate

Definition at line 36 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_K = 0x20
staticprivate

Definition at line 41 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_M = 0x10
staticprivate

Definition at line 40 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_NU = 0x00
staticprivate

Definition at line 35 of file strobe.hpp.

constexpr Flags kagome::primitives::Strobe::kFlag_T = 0x08
staticprivate

Definition at line 39 of file strobe.hpp.

constexpr uint8_t kagome::primitives::Strobe::kStrobeR = 166
staticprivate

Definition at line 30 of file strobe.hpp.

uint8_t kagome::primitives::Strobe::raw_data[kBufferSize+kAlignment-1ull+3ull]
private

Definition at line 43 of file strobe.hpp.


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