aether::netcode::transcode::integer_delta_transform< T > Struct Template Referenceabstract

Stateful transformer that XORs values. More...

#include <transcode.hh>

Public Types

using value_type = T
 
using unsigned_type = typename std::make_unsigned< value_type >::type
 
using transformed_type = typename std::make_signed< value_type >::type
 
using Output = std::make_signed< T >::type
 
using Input = T
 

Public Member Functions

bool apply (const T &input, transformed_type &output) override final
 
bool invert (const transformed_type &input, T &output) override final
 
virtual bool apply (const T &input, std::make_signed< T >::type &output)=0
 transform input into output More...
 
virtual bool invert (const std::make_signed< T >::type &input, T &output)=0
 invert the tranformation More...
 

Public Attributes

unsigned_type last_input = 0
 
unsigned_type last_output = 0
 

Detailed Description

template<typename T>
struct aether::netcode::transcode::integer_delta_transform< T >

Stateful transformer that XORs values.

Member Typedef Documentation

using aether::netcode::transcode::transform_base< T , std::make_signed< T >::type >::Input = T
inherited
using aether::netcode::transcode::transform_base< T , std::make_signed< T >::type >::Output = std::make_signed< T >::type
inherited
template<typename T >
using aether::netcode::transcode::integer_delta_transform< T >::transformed_type = typename std::make_signed<value_type>::type
template<typename T >
using aether::netcode::transcode::integer_delta_transform< T >::unsigned_type = typename std::make_unsigned<value_type>::type
template<typename T >
using aether::netcode::transcode::integer_delta_transform< T >::value_type = T

Member Function Documentation

virtual bool aether::netcode::transcode::transform_base< T , std::make_signed< T >::type >::apply ( const T &  input,
std::make_signed< T >::type &  output 
)
pure virtualinherited

transform input into output

Returns
whether the input is valid
template<typename T >
bool aether::netcode::transcode::integer_delta_transform< T >::apply ( const T &  input,
transformed_type output 
)
inlinefinaloverride
virtual bool aether::netcode::transcode::transform_base< T , std::make_signed< T >::type >::invert ( const std::make_signed< T >::type &  input,
T &  output 
)
pure virtualinherited

invert the tranformation

Returns
whehter input is valid
template<typename T >
bool aether::netcode::transcode::integer_delta_transform< T >::invert ( const transformed_type input,
T &  output 
)
inlinefinaloverride

Member Data Documentation

template<typename T >
unsigned_type aether::netcode::transcode::integer_delta_transform< T >::last_input = 0
template<typename T >
unsigned_type aether::netcode::transcode::integer_delta_transform< T >::last_output = 0