Botcraft 1.21.4
Loading...
Searching...
No Matches
Templates.hpp File Reference
#include <array>
#include <bitset>
#include <map>
#include <memory>
#include <optional>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  ProtocolCraft::VarType< T >
 
struct  ProtocolCraft::Internal::DiffType< T1, T2 >
 Just a simple type wrapper that will store with T1 and serialize as T2 (can be used for Enum/VarInt for example) More...
 
struct  ProtocolCraft::Internal::GetClassFromConditionPtr< bool(C::*)() const >
 
struct  ProtocolCraft::Internal::Conditioned< T, Condition, StoredAsOptional >
 A type wrapper to conditionally serialize a type. More...
 
struct  ProtocolCraft::Internal::Vector< T, S, N >
 
struct  ProtocolCraft::Internal::SerializedType< T >
 
struct  ProtocolCraft::Internal::SerializedType< VarType< T > >
 
struct  ProtocolCraft::Internal::SerializedType< NBT::UnnamedValue >
 
struct  ProtocolCraft::Internal::SerializedType< std::array< T, N > >
 
struct  ProtocolCraft::Internal::SerializedType< std::vector< T > >
 
struct  ProtocolCraft::Internal::SerializedType< Vector< T, void, 0 > >
 
struct  ProtocolCraft::Internal::SerializedType< Vector< T, void, N > >
 
struct  ProtocolCraft::Internal::SerializedType< Vector< T, U > >
 
struct  ProtocolCraft::Internal::SerializedType< std::optional< T > >
 
struct  ProtocolCraft::Internal::SerializedType< std::map< K, V > >
 
struct  ProtocolCraft::Internal::SerializedType< std::pair< T1, T2 > >
 
struct  ProtocolCraft::Internal::SerializedType< DiffType< T1, T2 > >
 
struct  ProtocolCraft::Internal::SerializedType< Conditioned< T, F, true > >
 
struct  ProtocolCraft::Internal::SerializedType< Conditioned< T, F, false > >
 
struct  ProtocolCraft::Internal::SerializedType< CustomType< T, R, W, S > >
 

Namespaces

namespace  ProtocolCraft
 
namespace  ProtocolCraft::NBT
 
namespace  ProtocolCraft::Json
 
namespace  ProtocolCraft::Internal
 

Typedefs

template<typename ... input_t>
using ProtocolCraft::Internal::tuple_cat_t = decltype(std::tuple_cat(std::declval< input_t >()...))
 Concat multiple tuples in one big tuple.
 

Functions

template<std::size_t... indices, class LoopBody >
void ProtocolCraft::Internal::loop_impl (std::index_sequence< indices... >, LoopBody &&loop_body)
 
template<std::size_t N, class LoopBody >
void ProtocolCraft::Internal::loop (LoopBody &&loop_body)
 

Variables

template<size_t N, typename T , template< size_t, typename > typename U, typename = void>
static constexpr size_t ProtocolCraft::Internal::field_index = 0
 Default case, see field_index specialization for implementation details.
 
template<typename T , typename Tuple >
constexpr bool ProtocolCraft::Internal::tuple_contains_type = false
 
template<typename T , typename Tuple >
constexpr int ProtocolCraft::Internal::get_tuple_index = 0
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsArray = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsVector = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsGenericVector = false
 
template<typename T , typename U , size_t N>
constexpr bool ProtocolCraft::Internal::IsGenericVector< Vector< T, U, N > > = true
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsMap = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsVarType = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsVarType< VarType< T > > = true
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsOptional = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsPair = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsBitset = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsConditioned = false
 
template<typename T , auto C, bool b>
constexpr bool ProtocolCraft::Internal::IsConditioned< Conditioned< T, C, b > > = true
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsCustomType = false
 
template<typename T , auto R, auto W, auto S>
constexpr bool ProtocolCraft::Internal::IsCustomType< CustomType< T, R, W, S > > = true
 
template<typename T >
constexpr bool ProtocolCraft::Internal::IsSharedPtr = false
 
template<typename T >
constexpr bool ProtocolCraft::Internal::dependant_false = false
 To be used in constexpr else to fail compilation in a C++ compliant way.