Electroneum
Classes | Namespaces | Macros | Typedefs | Functions
utility.h File Reference
#include <cstdint>
#include <stdexcept>
#include <tuple>
#include <type_traits>
#include <cstring>
#include <functional>
#include <string>
Include dependency graph for utility.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  crow::black_magic::OutOfRange
 
class  crow::black_magic::const_str
 
struct  crow::black_magic::parameter_tag< T >
 
struct  crow::black_magic::compute_parameter_tag_from_args_list< Args >
 
struct  crow::black_magic::compute_parameter_tag_from_args_list<>
 
struct  crow::black_magic::compute_parameter_tag_from_args_list< Arg, Args... >
 
struct  crow::black_magic::S< T >
 
struct  crow::black_magic::CallHelper< F, Set >
 
struct  crow::black_magic::CallHelper< F, S< Args... > >
 
struct  crow::black_magic::single_tag_to_type< N >
 
struct  crow::black_magic::single_tag_to_type< 1 >
 
struct  crow::black_magic::single_tag_to_type< 2 >
 
struct  crow::black_magic::single_tag_to_type< 3 >
 
struct  crow::black_magic::single_tag_to_type< 4 >
 
struct  crow::black_magic::single_tag_to_type< 5 >
 
struct  crow::black_magic::arguments< Tag >
 
struct  crow::black_magic::arguments< 0 >
 
struct  crow::black_magic::last_element_type< T >
 
struct  crow::black_magic::last_element_type<>
 
struct  crow::black_magic::seq<... >
 
struct  crow::black_magic::concat< S1, S2 >
 
struct  crow::black_magic::concat< seq< I1... >, seq< I2... > >
 
struct  crow::black_magic::gen_seq< N >
 
struct  crow::black_magic::gen_seq< N >
 
struct  crow::black_magic::gen_seq< 0 >
 
struct  crow::black_magic::gen_seq< 1 >
 
struct  crow::black_magic::pop_back_helper< Seq, Tuple >
 
struct  crow::black_magic::pop_back_helper< seq< N... >, Tuple >
 
struct  crow::black_magic::pop_back< T >
 
struct  crow::black_magic::pop_back<>
 
struct  crow::black_magic::contains< Tp, List >
 
struct  crow::black_magic::contains< Tp, Head, Rest... >
 
struct  crow::black_magic::contains< Tp >
 
struct  crow::black_magic::empty_context< T >
 
struct  crow::black_magic::promote< T >
 
struct  crow::detail::get_index_of_element_from_tuple_by_type_impl< T, N, Args >
 
struct  crow::detail::get_index_of_element_from_tuple_by_type_impl< T, N, T, Args... >
 
struct  crow::detail::get_index_of_element_from_tuple_by_type_impl< T, N, U, Args... >
 
struct  crow::utility::function_traits< T >
 
struct  crow::utility::function_traits< T >
 
struct  crow::utility::function_traits< R(ClassType::*)(Args...) const >
 
struct  crow::utility::function_traits< R(ClassType::*)(Args...)>
 
struct  crow::utility::function_traits< std::function< R(Args...)> >
 

Namespaces

 crow
 
 crow::black_magic
 
 crow::detail
 
 crow::utility
 

Macros

#define CROW_INTERNAL_PARAMETER_TAG(t, i)
 
#define CROW_INTERNAL_PROMOTE_TYPE(t1, t2)
 

Typedefs

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

Functions

constexpr unsigned crow::black_magic::requires_in_range (unsigned i, unsigned len)
 
constexpr unsigned crow::black_magic::find_closing_tag (const_str s, unsigned p)
 
constexpr bool crow::black_magic::is_valid (const_str s, unsigned i=0, int f=0)
 
constexpr bool crow::black_magic::is_equ_p (const char *a, const char *b, unsigned n)
 
constexpr bool crow::black_magic::is_equ_n (const_str a, unsigned ai, const_str b, unsigned bi, unsigned n)
 
constexpr bool crow::black_magic::is_int (const_str s, unsigned i)
 
constexpr bool crow::black_magic::is_uint (const_str s, unsigned i)
 
constexpr bool crow::black_magic::is_float (const_str s, unsigned i)
 
constexpr bool crow::black_magic::is_str (const_str s, unsigned i)
 
constexpr bool crow::black_magic::is_path (const_str s, unsigned i)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (int, 1)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (char, 1)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (short, 1)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (long, 1)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (unsigned int, 2)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (unsigned long long, 2)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (double, 3)
 
 crow::black_magic::CROW_INTERNAL_PARAMETER_TAG (std::string, 4)
 
static bool crow::black_magic::is_parameter_tag_compatible (uint64_t a, uint64_t b)
 
static unsigned crow::black_magic::find_closing_tag_runtime (const char *s, unsigned p)
 
static uint64_t crow::black_magic::get_parameter_tag_runtime (const char *s, unsigned p=0)
 
constexpr uint64_t crow::black_magic::get_parameter_tag (const_str s, unsigned p=0)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (char, int64_t)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (short, int64_t)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (int, int64_t)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (long, int64_t)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (unsigned char, uint64_t)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (unsigned long long, uint64_t)
 
 crow::black_magic::CROW_INTERNAL_PROMOTE_TYPE (float, double)
 
template<class T , class... Args>
Tcrow::utility::get_element_by_type (std::tuple< Args... > &t)
 
std::string crow::utility::base64encode (const char *data, size_t size, const char *key="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
 
std::string crow::utility::base64encode_urlsafe (const char *data, size_t size)
 

Macro Definition Documentation

◆ CROW_INTERNAL_PARAMETER_TAG

#define CROW_INTERNAL_PARAMETER_TAG (   t,
 
)
Value:
template <> \
struct parameter_tag<t> \
{ \
static const int value = i; \
}

◆ CROW_INTERNAL_PROMOTE_TYPE

#define CROW_INTERNAL_PROMOTE_TYPE (   t1,
  t2 
)
Value:
template<> \
struct promote<t1> \
{ \
using type = t2; \
}
type
Definition: json.h:74
t2
Definition: pow22523.h:103