Botcraft 1.21.4
Loading...
Searching...
No Matches
ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc > Struct Template Reference

#include <CustomType.hpp>

Public Types

using storage_type = typename SerializedType< T >::storage_type
 
using serialization_type = typename SerializedType< T >::serialization_type
 

Static Public Member Functions

template<typename C >
static storage_type Read (const C *c, std::vector< unsigned char >::const_iterator &iter, size_t &length)
 
template<typename C >
static void Write (const C *c, const storage_type &val, std::vector< unsigned char > &container)
 
template<typename C >
static std::optional< Json::ValueSerialize (const C *c, const storage_type &val)
 

Detailed Description

template<typename T, auto ReadFunc = nullptr, auto WriteFunc = nullptr, auto SerializeFunc = nullptr>
struct ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc >

Definition at line 13 of file CustomType.hpp.

Member Typedef Documentation

◆ serialization_type

template<typename T , auto ReadFunc = nullptr, auto WriteFunc = nullptr, auto SerializeFunc = nullptr>
using ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc >::serialization_type = typename SerializedType<T>::serialization_type

Definition at line 16 of file CustomType.hpp.

◆ storage_type

template<typename T , auto ReadFunc = nullptr, auto WriteFunc = nullptr, auto SerializeFunc = nullptr>
using ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc >::storage_type = typename SerializedType<T>::storage_type

Definition at line 15 of file CustomType.hpp.

Member Function Documentation

◆ Read()

template<typename T , auto ReadFunc = nullptr, auto WriteFunc = nullptr, auto SerializeFunc = nullptr>
template<typename C >
static storage_type ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc >::Read ( const C *  c,
std::vector< unsigned char >::const_iterator &  iter,
size_t &  length 
)
inlinestatic

Definition at line 19 of file CustomType.hpp.

◆ Serialize()

template<typename T , auto ReadFunc = nullptr, auto WriteFunc = nullptr, auto SerializeFunc = nullptr>
template<typename C >
static std::optional< Json::Value > ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc >::Serialize ( const C *  c,
const storage_type val 
)
inlinestatic

Definition at line 60 of file CustomType.hpp.

◆ Write()

template<typename T , auto ReadFunc = nullptr, auto WriteFunc = nullptr, auto SerializeFunc = nullptr>
template<typename C >
static void ProtocolCraft::Internal::CustomType< T, ReadFunc, WriteFunc, SerializeFunc >::Write ( const C *  c,
const storage_type val,
std::vector< unsigned char > &  container 
)
inlinestatic

Definition at line 47 of file CustomType.hpp.


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