WPILibC++ 2024.3.2
|
#include <stdint.h>
#include <concepts>
#include <memory>
#include <span>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
#include <fmt/format.h>
#include "wpi/Endian.h"
#include "wpi/bit.h"
#include "wpi/ct_string.h"
#include "wpi/function_ref.h"
#include "wpi/mutex.h"
#include "wpi/type_traits.h"
Go to the source code of this file.
Classes | |
struct | wpi::Struct< T, I > |
Struct serialization template. More... | |
class | wpi::StructArrayBuffer< T, I > |
struct | wpi::Struct< std::array< T, N >, I... > |
Raw struct support for fixed-size arrays of other structs. More... | |
struct | wpi::Struct< bool > |
Raw struct support for boolean values. More... | |
struct | wpi::Struct< uint8_t > |
Raw struct support for uint8_t values. More... | |
struct | wpi::Struct< int8_t > |
Raw struct support for int8_t values. More... | |
struct | wpi::Struct< uint16_t > |
Raw struct support for uint16_t values. More... | |
struct | wpi::Struct< int16_t > |
Raw struct support for int16_t values. More... | |
struct | wpi::Struct< uint32_t > |
Raw struct support for uint32_t values. More... | |
struct | wpi::Struct< int32_t > |
Raw struct support for int32_t values. More... | |
struct | wpi::Struct< uint64_t > |
Raw struct support for uint64_t values. More... | |
struct | wpi::Struct< int64_t > |
Raw struct support for int64_t values. More... | |
struct | wpi::Struct< float > |
Raw struct support for float values. More... | |
struct | wpi::Struct< double > |
Raw struct support for double values. More... | |
Namespaces | |
namespace | wpi |
Concepts | |
concept | wpi::StructSerializable |
Specifies that a type is capable of raw struct serialization and deserialization. | |
concept | wpi::MutableStructSerializable |
Specifies that a type is capable of in-place raw struct deserialization. | |
concept | wpi::HasNestedStruct |
Specifies that a struct type has nested struct declarations. | |
Functions | |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
T | wpi::UnpackStruct (std::span< const uint8_t > data, const I &... info) |
Unpack a serialized struct. More... | |
template<typename T , size_t Offset, typename... I> requires StructSerializable<T, I...> | |
T | wpi::UnpackStruct (std::span< const uint8_t > data, const I &... info) |
Unpack a serialized struct starting at a given offset within the data. More... | |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
void | wpi::PackStruct (std::span< uint8_t > data, T &&value, const I &... info) |
Pack a serialized struct. More... | |
template<size_t Offset, typename T , typename... I> requires StructSerializable<T, I...> | |
void | wpi::PackStruct (std::span< uint8_t > data, T &&value, const I &... info) |
Pack a serialized struct starting at a given offset within the data. More... | |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
void | wpi::UnpackStructInto (T *out, std::span< const uint8_t > data, const I &... info) |
Unpack a serialized struct into an existing object, overwriting its contents. More... | |
template<size_t Offset, typename T , typename... I> requires StructSerializable<T, I...> | |
void | wpi::UnpackStructInto (T *out, std::span< const uint8_t > data, const I &... info) |
Unpack a serialized struct into an existing object, overwriting its contents, and starting at a given offset within the data. More... | |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
constexpr auto | wpi::GetStructTypeString (const I &... info) |
Get the type string for a raw struct serializable type. More... | |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
constexpr size_t | wpi::GetStructSize (const I &... info) |
Get the size for a raw struct serializable type. More... | |
template<typename T , size_t N, typename... I> requires StructSerializable<T, I...> | |
constexpr auto | wpi::MakeStructArrayTypeString (const I &... info) |
template<typename T , size_t N, typename... I> requires StructSerializable<T, I...> | |
constexpr auto | wpi::MakeStructArraySchema (const I &... info) |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
constexpr std::string_view | wpi::GetStructSchema (const I &... info) |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
constexpr std::span< const uint8_t > | wpi::GetStructSchemaBytes (const I &... info) |
template<typename T , typename... I> requires StructSerializable<T, I...> | |
void | wpi::ForEachStructSchema (std::invocable< std::string_view, std::string_view > auto fn, const I &... info) |