WPILibC++ 2025.2.1
|
These are wrappers over isa* function that allow them to be used in generic algorithms such as wpi:all_of
, wpi::none_of
, etc.
More...
Concepts | |
concept | Validatable |
Typedefs | |
template<typename OptionalDerived , typename Default > | |
using | SelfType |
A helper to derive the type to use with Self for cast traits, when the provided CRTP derived type is allowed to be void. | |
template<typename T > | |
using | EnableIfTrivial |
template<typename CallableT , typename ThisT > | |
using | EnableUnlessSameType |
template<typename CallableT , typename Ret , typename... Params> | |
using | EnableIfCallable |
template<typename RangeT > | |
using | IterOfRange = decltype(adl_begin(std::declval<RangeT &>())) |
template<typename RangeT > | |
using | ValueOfRange |
using | SmallVectorType = wpi::SmallVectorImpl<uint8_t> |
using | StdVectorType = std::vector<uint8_t> |
Functions | |
template<Validatable T> | |
constexpr bool | ValidateType (pb_type_t type) |
template<typename T > | |
bool | isPresent (const T &t) |
template<typename T > | |
decltype(auto) | unwrapValue (T &t) |
unsigned | combineHashValue (unsigned a, unsigned b) |
Simplistic combination of 32-bit hash values into 32-bit hash values. | |
void | swap (SafeThreadOwnerBase &lhs, SafeThreadOwnerBase &rhs) |
template<typename R , typename... T> | |
void | RunWorkerThreadRequest (WorkerThreadThread< R, T... > &thr, WorkerThreadRequest< R, T... > &req) |
template<typename... T> | |
void | RunWorkerThreadRequest (WorkerThreadThread< void, T... > &thr, WorkerThreadRequest< void, T... > &req) |
bool | WriteFromSmallVector (pb_ostream_t *stream, const pb_byte_t *buf, size_t count) |
bool | WriteFromStdVector (pb_ostream_t *stream, const pb_byte_t *buf, size_t count) |
bool | WriteSubmessage (pb_ostream_t *stream, const pb_msgdesc_t *desc, const void *msg) |
std::string | GetTypeString (const pb_msgdesc_t *msg) |
void | ForEachProtobufDescriptor (const pb_msgdesc_t *msg, function_ref< bool(std::string_view filename)> wants, function_ref< void(std::string_view filename, std::span< const uint8_t > descriptor)> fn) |
bool | GetAsUnsignedInteger (std::string_view str, unsigned radix, unsigned long long &result) noexcept |
bool | GetAsSignedInteger (std::string_view str, unsigned radix, long long &result) noexcept |
bool | ConsumeUnsignedInteger (std::string_view &str, unsigned radix, unsigned long long &result) noexcept |
bool | ConsumeSignedInteger (std::string_view &str, unsigned radix, long long &result) noexcept |
These are wrappers over isa* function that allow them to be used in generic algorithms such as wpi:all_of
, wpi::none_of
, etc.
This is accomplished by exposing the isa* functions through function objects with a generic function call operator.
using wpi::detail::EnableIfCallable |
using wpi::detail::EnableIfTrivial |
using wpi::detail::EnableUnlessSameType |
using wpi::detail::IterOfRange = decltype(adl_begin(std::declval<RangeT &>())) |
using wpi::detail::SelfType |
A helper to derive the type to use with Self
for cast traits, when the provided CRTP derived type is allowed to be void.
using wpi::detail::SmallVectorType = wpi::SmallVectorImpl<uint8_t> |
using wpi::detail::StdVectorType = std::vector<uint8_t> |
using wpi::detail::ValueOfRange |
|
inline |
Simplistic combination of 32-bit hash values into 32-bit hash values.
|
noexcept |
|
noexcept |
void wpi::detail::ForEachProtobufDescriptor | ( | const pb_msgdesc_t * | msg, |
function_ref< bool(std::string_view filename)> | wants, | ||
function_ref< void(std::string_view filename, std::span< const uint8_t > descriptor)> | fn ) |
|
noexcept |
|
noexcept |
std::string wpi::detail::GetTypeString | ( | const pb_msgdesc_t * | msg | ) |
|
inline |
void wpi::detail::RunWorkerThreadRequest | ( | WorkerThreadThread< R, T... > & | thr, |
WorkerThreadRequest< R, T... > & | req ) |
void wpi::detail::RunWorkerThreadRequest | ( | WorkerThreadThread< void, T... > & | thr, |
WorkerThreadRequest< void, T... > & | req ) |
|
noexcept |
|
inline |
|
constexpr |
bool wpi::detail::WriteFromSmallVector | ( | pb_ostream_t * | stream, |
const pb_byte_t * | buf, | ||
size_t | count ) |
bool wpi::detail::WriteFromStdVector | ( | pb_ostream_t * | stream, |
const pb_byte_t * | buf, | ||
size_t | count ) |
bool wpi::detail::WriteSubmessage | ( | pb_ostream_t * | stream, |
const pb_msgdesc_t * | desc, | ||
const void * | msg ) |