Electroneum
Classes | Typedefs | Functions
crow::black_magic Namespace Reference

Classes

struct  arguments
 
struct  arguments< 0 >
 
struct  CallHelper
 
struct  CallHelper< F, S< Args... > >
 
struct  compute_parameter_tag_from_args_list
 
struct  compute_parameter_tag_from_args_list< Arg, Args... >
 
struct  compute_parameter_tag_from_args_list<>
 
struct  concat
 
struct  concat< seq< I1... >, seq< I2... > >
 
class  const_str
 
struct  contains
 
struct  contains< Tp >
 
struct  contains< Tp, Head, Rest... >
 
struct  empty_context
 
struct  gen_seq
 
struct  gen_seq< 0 >
 
struct  gen_seq< 1 >
 
struct  last_element_type
 
struct  last_element_type<>
 
struct  OutOfRange
 
struct  parameter_tag
 
struct  pop_back
 
struct  pop_back<>
 
struct  pop_back_helper
 
struct  pop_back_helper< seq< N... >, Tuple >
 
struct  promote
 
struct  S
 
struct  seq
 
struct  single_tag_to_type
 
struct  single_tag_to_type< 1 >
 
struct  single_tag_to_type< 2 >
 
struct  single_tag_to_type< 3 >
 
struct  single_tag_to_type< 4 >
 
struct  single_tag_to_type< 5 >
 

Typedefs

template<class T >
using Invoke = typename T::type
 
template<class S1 , class S2 >
using Concat = Invoke< concat< S1, S2 > >
 
template<unsigned N>
using GenSeq = Invoke< gen_seq< N > >
 
template<typename T >
using promote_t = typename promote< T >::type
 

Functions

constexpr unsigned requires_in_range (unsigned i, unsigned len)
 
constexpr unsigned find_closing_tag (const_str s, unsigned p)
 
constexpr bool is_valid (const_str s, unsigned i=0, int f=0)
 
constexpr bool is_equ_p (const char *a, const char *b, unsigned n)
 
constexpr bool is_equ_n (const_str a, unsigned ai, const_str b, unsigned bi, unsigned n)
 
constexpr bool is_int (const_str s, unsigned i)
 
constexpr bool is_uint (const_str s, unsigned i)
 
constexpr bool is_float (const_str s, unsigned i)
 
constexpr bool is_str (const_str s, unsigned i)
 
constexpr bool is_path (const_str s, unsigned i)
 
 CROW_INTERNAL_PARAMETER_TAG (int, 1)
 
 CROW_INTERNAL_PARAMETER_TAG (char, 1)
 
 CROW_INTERNAL_PARAMETER_TAG (short, 1)
 
 CROW_INTERNAL_PARAMETER_TAG (long, 1)
 
 CROW_INTERNAL_PARAMETER_TAG (unsigned int, 2)
 
 CROW_INTERNAL_PARAMETER_TAG (unsigned long long, 2)
 
 CROW_INTERNAL_PARAMETER_TAG (double, 3)
 
 CROW_INTERNAL_PARAMETER_TAG (std::string, 4)
 
static bool is_parameter_tag_compatible (uint64_t a, uint64_t b)
 
static unsigned find_closing_tag_runtime (const char *s, unsigned p)
 
static uint64_t get_parameter_tag_runtime (const char *s, unsigned p=0)
 
constexpr uint64_t get_parameter_tag (const_str s, unsigned p=0)
 
 CROW_INTERNAL_PROMOTE_TYPE (char, int64_t)
 
 CROW_INTERNAL_PROMOTE_TYPE (short, int64_t)
 
 CROW_INTERNAL_PROMOTE_TYPE (int, int64_t)
 
 CROW_INTERNAL_PROMOTE_TYPE (long, int64_t)
 
 CROW_INTERNAL_PROMOTE_TYPE (unsigned char, uint64_t)
 
 CROW_INTERNAL_PROMOTE_TYPE (unsigned long long, uint64_t)
 
 CROW_INTERNAL_PROMOTE_TYPE (float, double)
 

Typedef Documentation

◆ Concat

template<class S1 , class S2 >
using crow::black_magic::Concat = typedef Invoke<concat<S1, S2> >

◆ GenSeq

template<unsigned N>
using crow::black_magic::GenSeq = typedef Invoke<gen_seq<N> >

◆ Invoke

template<class T >
using crow::black_magic::Invoke = typedef typename T::type

◆ promote_t

template<typename T >
using crow::black_magic::promote_t = typedef typename promote<T>::type

Function Documentation

◆ CROW_INTERNAL_PARAMETER_TAG() [1/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( int  ,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [2/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( char  ,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [3/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( short  ,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [4/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( long  ,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [5/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( unsigned  int,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [6/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( unsigned long  long,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [7/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( double  ,
 
)

◆ CROW_INTERNAL_PARAMETER_TAG() [8/8]

crow::black_magic::CROW_INTERNAL_PARAMETER_TAG ( std::string  ,
 
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [1/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( char  ,
int64_t   
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [2/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( short  ,
int64_t   
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [3/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( int  ,
int64_t   
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [4/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( long  ,
int64_t   
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [5/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( unsigned  char,
uint64_t   
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [6/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( unsigned long  long,
uint64_t   
)

◆ CROW_INTERNAL_PROMOTE_TYPE() [7/7]

crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE ( float  ,
double   
)

◆ find_closing_tag()

constexpr unsigned crow::black_magic::find_closing_tag ( const_str  s,
unsigned  p 
)

◆ find_closing_tag_runtime()

static unsigned crow::black_magic::find_closing_tag_runtime ( const char *  s,
unsigned  p 
)
inlinestatic

◆ get_parameter_tag()

constexpr uint64_t crow::black_magic::get_parameter_tag ( const_str  s,
unsigned  p = 0 
)

◆ get_parameter_tag_runtime()

static uint64_t crow::black_magic::get_parameter_tag_runtime ( const char *  s,
unsigned  p = 0 
)
inlinestatic

◆ is_equ_n()

constexpr bool crow::black_magic::is_equ_n ( const_str  a,
unsigned  ai,
const_str  b,
unsigned  bi,
unsigned  n 
)

◆ is_equ_p()

constexpr bool crow::black_magic::is_equ_p ( const char *  a,
const char *  b,
unsigned  n 
)

◆ is_float()

constexpr bool crow::black_magic::is_float ( const_str  s,
unsigned  i 
)

◆ is_int()

constexpr bool crow::black_magic::is_int ( const_str  s,
unsigned  i 
)

◆ is_parameter_tag_compatible()

static bool crow::black_magic::is_parameter_tag_compatible ( uint64_t  a,
uint64_t  b 
)
inlinestatic

◆ is_path()

constexpr bool crow::black_magic::is_path ( const_str  s,
unsigned  i 
)

◆ is_str()

constexpr bool crow::black_magic::is_str ( const_str  s,
unsigned  i 
)

◆ is_uint()

constexpr bool crow::black_magic::is_uint ( const_str  s,
unsigned  i 
)

◆ is_valid()

constexpr bool crow::black_magic::is_valid ( const_str  s,
unsigned  i = 0,
int  f = 0 
)

◆ requires_in_range()

constexpr unsigned crow::black_magic::requires_in_range ( unsigned  i,
unsigned  len 
)