JayBeams  0.1
Another project to have fun coding.
Static Public Member Functions | List of all members
jb::itch5::encoder< validate, T > Struct Template Reference

TODO(#19) all this code should be replaced with Boost.Endian. More...

#include <encoder.hpp>

Static Public Member Functions

static void w (std::size_t size, void *msg, std::size_t offset, T const &x)
 Write a single message or field to a buffer. More...
 

Detailed Description

template<bool validate, typename T>
struct jb::itch5::encoder< validate, T >

TODO(#19) all this code should be replaced with Boost.Endian.

Definition at line 13 of file encoder.hpp.

Member Function Documentation

◆ w()

template<bool validate, typename T>
static void jb::itch5::encoder< validate, T >::w ( std::size_t  size,
void *  msg,
std::size_t  offset,
T const &  x 
)
static

Write a single message or field to a buffer.

Parameters
sizethe size of the message
msgthe contents of the message
offsetwhere in the message to start encoding
xthe value to encode
Exceptions
std::runtime_errorif the buffer cannot hold the message.

Referenced by jb::itch5::mold_udp_pacer< clock_type >::coalesce(), jb::itch5::testing::create_message(), jb::itch5::mold_udp_pacer< clock_type >::fillup_header_fields(), jb::itch5::encoder< validate, std::uint16_t >::w(), jb::itch5::encoder< validate, std::uint32_t >::w(), jb::itch5::encoder< validate, std::uint64_t >::w(), and jb::itch5::encoder< validate, timestamp >::w().


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