![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
C++ language features and design patterns. More...

Files | |
| file | tsAfterStandardHeaders.h |
| file | tsBCD.h |
| file | tsBeforeStandardHeaders.h |
| file | tsEnumUtils.h |
| file | tsFloatUtils.h |
| file | tsIntegerUtils.h |
| file | tsMemory.h |
| file | tsPlatform.h |
| file | tsUChar.h |
Concepts | |
| concept | ts::int_enum |
| concept | ts::is_duration |
| concept | ts::is_optional |
Typedefs | |
| using | ts::BoolPredicate = bool (*)(bool, bool) |
| using | ts::char_ptr = char* |
Pointer to char. | |
| using | ts::const_char_ptr = const char* |
Pointer to const char. | |
| using | ts::const_int16_ptr = const int16_t* |
Pointer to const int16_t. | |
| using | ts::const_int32_ptr = const int32_t* |
Pointer to const int32_t. | |
| using | ts::const_int64_ptr = const int64_t* |
Pointer to const int64_t. | |
| using | ts::const_int8_ptr = const int8_t* |
Pointer to const int8_t. | |
| using | ts::const_uint16_ptr = const uint16_t* |
Pointer to const uint16_t. | |
| using | ts::const_uint32_ptr = const uint32_t* |
Pointer to const uint32_t. | |
| using | ts::const_uint64_ptr = const uint64_t* |
Pointer to const uint64_t. | |
| using | ts::const_uint8_ptr = const uint8_t* |
Pointer to const uint8_t. | |
| using | ts::deciseconds = cn::duration<cn::milliseconds::rep, std::deci> |
| using | ts::ieee_float128_t = typename ieee_float<128, 15, 112>::type |
| using | ts::ieee_float32_t = typename ieee_float<32, 8, 23>::type |
| using | ts::ieee_float64_t = typename ieee_float<64, 11, 52>::type |
| using | ts::ieee_float80_t = typename ieee_float<80, 15, 64>::type |
| using | ts::int16_ptr = int16_t* |
Pointer to int16_t. | |
| using | ts::int32_ptr = int32_t* |
Pointer to int32_t. | |
| using | ts::int64_ptr = int64_t* |
Pointer to int64_t. | |
| using | ts::int8_ptr = int8_t* |
Pointer to int8_t. | |
| template<typename INT> | |
| using | ts::int_max_t = typename int_max<INT>::type |
| template<typename T> | |
| using | ts::make_signed_t = typename make_signed<T>::type |
| using | ts::MonoBoolPredicate = bool (*)(bool) |
| using | ts::monotonic_time = cn::time_point<cn::steady_clock> |
| using | ts::MultiBoolPredicate = bool (*)(std::initializer_list<bool>) |
| using | ts::ObjectPtr = std::shared_ptr<Object> |
| using | ts::UChar = char16_t |
| using | ts::uint16_ptr = uint16_t* |
Pointer to uint16_t. | |
| using | ts::uint32_ptr = uint32_t* |
Pointer to uint32_t. | |
| using | ts::uint64_ptr = uint64_t* |
Pointer to uint64_t. | |
| using | ts::uint8_ptr = uint8_t* |
Pointer to uint8_t. | |
| using | ts::unaligned_int16_t = int16_t |
Unaligned int16_t. | |
| using | ts::unaligned_int32_t = int32_t |
Unaligned int32_t. | |
| using | ts::unaligned_int64_t = int64_t |
Unaligned int64_t. | |
| using | ts::unaligned_uint16_t = uint16_t |
Unaligned uint16_t. | |
| using | ts::unaligned_uint32_t = uint32_t |
Unaligned uint32_t. | |
| using | ts::unaligned_uint64_t = uint64_t |
Unaligned uint64_t. | |
| template<typename T> | |
| using | ts::underlying_type_t = typename underlying_type<T>::type |
| using | ts::UStringList = std::list<UString> |
| using | ts::UStringToUStringMap = std::map<UString, UString> |
| using | ts::UStringToUStringMultiMap = std::multimap<UString, UString> |
| using | ts::UStringVector = std::vector<UString> |
Functions | |
| template<typename INT> requires std::integral<INT> | |
| constexpr INT | ts::abs (INT a) |
| template<typename INT> requires std::integral<INT> | |
| constexpr bool | ts::add_overflow (INT a, INT b) noexcept |
| bool | ts::And (bool arg1, bool arg2) |
| template<typename ELEMENT, class CONTAINER> | |
| bool | ts::AppendUnique (CONTAINER &container, const ELEMENT &e) |
| void | ts::BCDToString (std::string &str, const uint8_t *bcd, size_t bcd_count, int decimal, bool left_justified=true) |
| template<typename INT> requires std::integral<INT> | |
| size_t | ts::BitSize (INT x) |
| template<typename INT1, typename INT2> requires std::integral<INT1> && std::integral<INT2> | |
| constexpr bool | ts::bound_check (INT2 x) noexcept |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::bounded_add (INT a, INT b) |
| template<typename INT1, typename INT2> requires std::integral<INT1> && std::integral<INT2> | |
| constexpr INT1 | ts::bounded_cast (INT2 x) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::bounded_sub (INT a, INT b) |
| uint16_t | ts::ByteSwap16 (uint16_t x) |
| uint32_t | ts::ByteSwap24 (uint32_t x) |
| uint32_t | ts::ByteSwap32 (uint32_t x) |
| uint64_t | ts::ByteSwap64 (uint64_t x) |
| UString | ts::ClassName (const std::type_index index) |
| UString | ts::ClassName (const std::type_info &info) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::CondByteSwap (INT x) |
| uint16_t | ts::CondByteSwap16 (uint16_t x) |
| uint16_t | ts::CondByteSwap16BE (uint16_t x) |
| uint16_t | ts::CondByteSwap16LE (uint16_t x) |
| uint32_t | ts::CondByteSwap24 (uint32_t x) |
| uint32_t | ts::CondByteSwap24BE (uint32_t x) |
| uint32_t | ts::CondByteSwap24LE (uint32_t x) |
| uint32_t | ts::CondByteSwap32 (uint32_t x) |
| uint32_t | ts::CondByteSwap32BE (uint32_t x) |
| uint32_t | ts::CondByteSwap32LE (uint32_t x) |
| uint64_t | ts::CondByteSwap64 (uint64_t x) |
| uint64_t | ts::CondByteSwap64BE (uint64_t x) |
| uint64_t | ts::CondByteSwap64LE (uint64_t x) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::CondByteSwapBE (INT x) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::CondByteSwapLE (INT x) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::debug_thow_neg_overflow (INT a) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::debug_throw_add_overflow (INT a, INT b) |
| template<typename INT1, typename INT2> requires std::integral<INT1> && std::integral<INT2> | |
| void | ts::debug_throw_bound_check (INT2 x) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::debug_throw_div_zero (INT den) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::debug_throw_mul_overflow (INT a, INT b) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::debug_throw_sub_overflow (INT a, INT b) |
| uint32_t | ts::DecodeBCD (const uint8_t *bcd, size_t bcd_count, bool left_justified=true) |
| int | ts::DecodeBCD (uint8_t b) |
| bool | ts::DecomposePrecombined (UChar c, UChar &letter, UChar &mark) |
| uint8_t | ts::EncodeBCD (int i) |
| void | ts::EncodeBCD (uint8_t *bcd, size_t bcd_count, uint32_t value, bool left_justified=true, uint8_t pad_nibble=0) |
| template<typename T, class UnaryPredicate> | |
| bool | ts::EnumerateCombinations (const std::set< T > &values, const std::set< T > &fixed, size_t size, UnaryPredicate predicate) |
| template<typename T> requires std::floating_point<T> | |
| bool | ts::equal_float (T a, T b, T epsilon=2 *std::numeric_limits< T >::epsilon()) |
| UChar | ts::FromHTML (const UString &entity) |
| char32_t | ts::FromSurrogatePair (UChar lead, UChar trail) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GCD (INT x, INT y) |
| ieee_float32_t | ts::GetFloat32 (const void *p) |
| ieee_float32_t | ts::GetFloat32BE (const void *p) |
| ieee_float32_t | ts::GetFloat32LE (const void *p) |
| ieee_float64_t | ts::GetFloat64 (const void *p) |
| ieee_float64_t | ts::GetFloat64BE (const void *p) |
| ieee_float64_t | ts::GetFloat64LE (const void *p) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GetInt (const void *p) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::GetInt (const void *p, INT &i) |
| int16_t | ts::GetInt16 (const void *p) |
| void | ts::GetInt16 (const void *p, int16_t &i) |
| int16_t | ts::GetInt16BE (const void *p) |
| void | ts::GetInt16BE (const void *p, int16_t &i) |
| int16_t | ts::GetInt16LE (const void *p) |
| void | ts::GetInt16LE (const void *p, int16_t &i) |
| int32_t | ts::GetInt24 (const void *p) |
| void | ts::GetInt24 (const void *p, int32_t &i) |
| int32_t | ts::GetInt24BE (const void *p) |
| void | ts::GetInt24BE (const void *p, int32_t &i) |
| int32_t | ts::GetInt24LE (const void *p) |
| void | ts::GetInt24LE (const void *p, int32_t &i) |
| int32_t | ts::GetInt32 (const void *p) |
| void | ts::GetInt32 (const void *p, int32_t &i) |
| int32_t | ts::GetInt32BE (const void *p) |
| void | ts::GetInt32BE (const void *p, int32_t &i) |
| int32_t | ts::GetInt32LE (const void *p) |
| void | ts::GetInt32LE (const void *p, int32_t &i) |
| int64_t | ts::GetInt40BE (const void *p) |
| int64_t | ts::GetInt40LE (const void *p) |
| int64_t | ts::GetInt48BE (const void *p) |
| int64_t | ts::GetInt48LE (const void *p) |
| int64_t | ts::GetInt56BE (const void *p) |
| int64_t | ts::GetInt56LE (const void *p) |
| int64_t | ts::GetInt64 (const void *p) |
| void | ts::GetInt64 (const void *p, int64_t &i) |
| int64_t | ts::GetInt64BE (const void *p) |
| void | ts::GetInt64BE (const void *p, int64_t &i) |
| int64_t | ts::GetInt64LE (const void *p) |
| void | ts::GetInt64LE (const void *p, int64_t &i) |
| int8_t | ts::GetInt8 (const void *p) |
| void | ts::GetInt8 (const void *p, int8_t &i) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GetIntBE (const void *p) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::GetIntBE (const void *p, INT &i) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| INT | ts::GetIntFix (const void *p) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| void | ts::GetIntFix (const void *p, INT &i) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| INT | ts::GetIntFixBE (const void *p) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| void | ts::GetIntFixBE (const void *p, INT &i) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| INT | ts::GetIntFixLE (const void *p) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| void | ts::GetIntFixLE (const void *p, INT &i) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GetIntLE (const void *p) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::GetIntLE (const void *p, INT &i) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GetIntVar (const void *p, size_t size) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::GetIntVar (const void *p, size_t size, INT &i) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GetIntVarBE (const void *p, size_t size) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::GetIntVarBE (const void *p, size_t size, INT &i) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::GetIntVarLE (const void *p, size_t size) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::GetIntVarLE (const void *p, size_t size, INT &i) |
| uint16_t | ts::GetUInt16 (const void *p) |
| void | ts::GetUInt16 (const void *p, uint16_t &i) |
| uint16_t | ts::GetUInt16BE (const void *p) |
| void | ts::GetUInt16BE (const void *p, uint16_t &i) |
| uint16_t | ts::GetUInt16LE (const void *p) |
| void | ts::GetUInt16LE (const void *p, uint16_t &i) |
| uint32_t | ts::GetUInt24 (const void *p) |
| void | ts::GetUInt24 (const void *p, uint32_t &i) |
| uint32_t | ts::GetUInt24BE (const void *p) |
| void | ts::GetUInt24BE (const void *p, uint32_t &i) |
| uint32_t | ts::GetUInt24LE (const void *p) |
| void | ts::GetUInt24LE (const void *p, uint32_t &i) |
| uint32_t | ts::GetUInt32 (const void *p) |
| void | ts::GetUInt32 (const void *p, uint32_t &i) |
| uint32_t | ts::GetUInt32BE (const void *p) |
| void | ts::GetUInt32BE (const void *p, uint32_t &i) |
| uint32_t | ts::GetUInt32LE (const void *p) |
| void | ts::GetUInt32LE (const void *p, uint32_t &i) |
| uint64_t | ts::GetUInt40 (const void *p) |
| void | ts::GetUInt40 (const void *p, uint64_t &i) |
| uint64_t | ts::GetUInt40BE (const void *p) |
| uint64_t | ts::GetUInt40LE (const void *p) |
| uint64_t | ts::GetUInt48 (const void *p) |
| void | ts::GetUInt48 (const void *p, uint64_t &i) |
| uint64_t | ts::GetUInt48BE (const void *p) |
| uint64_t | ts::GetUInt48LE (const void *p) |
| uint64_t | ts::GetUInt56 (const void *p) |
| void | ts::GetUInt56 (const void *p, uint64_t &i) |
| uint64_t | ts::GetUInt56BE (const void *p) |
| uint64_t | ts::GetUInt56LE (const void *p) |
| uint64_t | ts::GetUInt64 (const void *p) |
| void | ts::GetUInt64 (const void *p, uint64_t &i) |
| uint64_t | ts::GetUInt64BE (const void *p) |
| void | ts::GetUInt64BE (const void *p, uint64_t &i) |
| uint64_t | ts::GetUInt64LE (const void *p) |
| void | ts::GetUInt64LE (const void *p, uint64_t &i) |
| uint8_t | ts::GetUInt8 (const void *p) |
| void | ts::GetUInt8 (const void *p, uint8_t &i) |
| bool | ts::IdenticalBytes (const void *area, size_t area_size) |
| bool | ts::Identity (bool arg) |
| template<class OSTREAM, class TRAITS = std::char_traits<typename OSTREAM::char_type>> | |
| std::basic_ostream< typename OSTREAM::char_type, TRAITS > & | ts::IOManipulator (std::basic_ostream< typename OSTREAM::char_type, TRAITS > &strm, OSTREAM &(OSTREAM::*func)()) |
| template<typename T> requires int_enum<T> | |
| constexpr bool | ts::is_negative (T x) |
| bool | ts::IsAccented (UChar c) |
| bool | ts::IsAlpha (UChar c) |
| bool | ts::IsAlphaNum (UChar c) |
| bool | ts::IsBase64 (UChar c) |
| bool | ts::IsCombiningDiacritical (UChar c) |
| bool | ts::IsDigit (UChar c) |
| bool | ts::IsHexa (UChar c) |
| bool | ts::IsLeadingSurrogate (UChar c) |
| bool | ts::IsLower (UChar c) |
| bool | ts::IsPrintable (UChar c) |
| bool | ts::IsSpace (UChar c) |
| bool | ts::IsTrailingSurrogate (UChar c) |
| bool | ts::IsUpper (UChar c) |
| bool | ts::IsValidBCD (uint8_t b) |
| template<class CONTAINER> | |
| size_t | ts::LargestSize (const CONTAINER &container) |
| UChar | ts::LeadingSurrogate (char32_t cp) |
| const uint8_t * | ts::LocatePattern (const void *area, size_t area_size, const void *pattern, size_t pattern_size) |
| const uint8_t * | ts::LocateZeroZero (const void *area, size_t area_size, uint8_t third) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::LSBMask (size_t bits) |
| template<class MAP> | |
| std::list< typename MAP::key_type > | ts::MapKeysList (const MAP &container) |
| template<class MAP> | |
| std::set< typename MAP::key_type > | ts::MapKeysSet (const MAP &container) |
| template<class MAP> | |
| std::list< typename MAP::mapped_type > | ts::MapValuesList (const MAP &container) |
| bool | ts::Match (UChar c1, UChar c2, CaseSensitivity cs) |
| template<typename T, int storage_bits, int exponent_bits, int mantissa_bits> requires std::floating_point<T> | |
| constexpr bool | ts::match_ieee_float () |
| size_t | ts::MaxDecimalWidth (size_t typeSize, size_t digitSeparatorSize=0) |
| size_t | ts::MaxHexaWidth (size_t typeSize, size_t digitSeparatorSize=0) |
| int | ts::MemCompare (const void *addr1, const void *addr2, size_t size) |
| void | ts::MemCopy (void *dest, const void *src, size_t size) |
| bool | ts::MemEqual (const void *addr1, const void *addr2, size_t size) |
| void | ts::MemSet (void *addr, uint8_t value, size_t size) |
| void | ts::MemXor (void *dest, const void *src1, const void *src2, size_t size) |
| void | ts::MemZero (void *addr, size_t size) |
| template<typename INT> requires std::integral<INT> | |
| constexpr bool | ts::mul_overflow (INT a, INT b) noexcept |
| bool | ts::MultiAnd (std::initializer_list< bool > args) |
| bool | ts::MultiNand (std::initializer_list< bool > args) |
| bool | ts::MultiNor (std::initializer_list< bool > args) |
| bool | ts::MultiOr (std::initializer_list< bool > args) |
| bool | ts::Nand (bool arg1, bool arg2) |
| bool | ts::NeedSurrogate (char32_t cp) |
| template<typename INT> requires std::integral<INT> | |
| constexpr bool | ts::neg_overflow (INT a) noexcept |
| bool | ts::Nor (bool arg1, bool arg2) |
| bool | ts::Not (bool arg) |
| template<class OSTREAM, class PARAM, class TRAITS = std::char_traits<typename OSTREAM::char_type>> | |
| std::basic_ostream< typename OSTREAM::char_type, TRAITS > & | operator<< (std::basic_ostream< typename OSTREAM::char_type, TRAITS > &strm, const ts::IOManipulatorProxy< OSTREAM, PARAM, TRAITS > &proxy) |
| std::ostream & | operator<< (std::ostream &strm, const ts::DisplayInterface &obj) |
| bool | ts::Or (bool arg1, bool arg2) |
| uint64_t | ts::Power10 (size_t pow) |
| UChar | ts::Precombined (UChar letter, UChar mark) |
| void | ts::PutFloat32 (void *p, ieee_float32_t f) |
| void | ts::PutFloat32BE (void *p, ieee_float32_t f) |
| void | ts::PutFloat32LE (void *p, ieee_float32_t f) |
| void | ts::PutFloat64 (void *p, ieee_float64_t f) |
| void | ts::PutFloat64BE (void *p, ieee_float64_t f) |
| void | ts::PutFloat64LE (void *p, ieee_float64_t f) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::PutInt (void *p, INT i) |
| void | ts::PutInt16 (void *p, int16_t i) |
| void | ts::PutInt16BE (void *p, int16_t i) |
| void | ts::PutInt16LE (void *p, int16_t i) |
| void | ts::PutInt24 (void *p, int32_t i) |
| void | ts::PutInt24BE (void *p, int32_t i) |
| void | ts::PutInt24LE (void *p, int32_t i) |
| void | ts::PutInt32 (void *p, int32_t i) |
| void | ts::PutInt32BE (void *p, int32_t i) |
| void | ts::PutInt32LE (void *p, int32_t i) |
| void | ts::PutInt40BE (void *p, int64_t i) |
| void | ts::PutInt40LE (void *p, int64_t i) |
| void | ts::PutInt48BE (void *p, int64_t i) |
| void | ts::PutInt48LE (void *p, int64_t i) |
| void | ts::PutInt56BE (void *p, int64_t i) |
| void | ts::PutInt56LE (void *p, int64_t i) |
| void | ts::PutInt64 (void *p, int64_t i) |
| void | ts::PutInt64BE (void *p, int64_t i) |
| void | ts::PutInt64LE (void *p, int64_t i) |
| void | ts::PutInt8 (void *p, int8_t i) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::PutIntBE (void *p, INT i) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| void | ts::PutIntFix (void *p, INT i) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| void | ts::PutIntFixBE (void *p, INT i) |
| template<const size_t SIZE, typename INT> requires std::integral<INT> | |
| void | ts::PutIntFixLE (void *p, INT i) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::PutIntLE (void *p, INT i) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::PutIntVar (void *p, size_t size, INT i) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::PutIntVarBE (void *p, size_t size, INT i) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::PutIntVarLE (void *p, size_t size, INT i) |
| void | ts::PutUInt16 (void *p, uint16_t i) |
| void | ts::PutUInt16BE (void *p, uint16_t i) |
| void | ts::PutUInt16LE (void *p, uint16_t i) |
| void | ts::PutUInt24 (void *p, uint32_t i) |
| void | ts::PutUInt24BE (void *p, uint32_t i) |
| void | ts::PutUInt24LE (void *p, uint32_t i) |
| void | ts::PutUInt32 (void *p, uint32_t i) |
| void | ts::PutUInt32BE (void *p, uint32_t i) |
| void | ts::PutUInt32LE (void *p, uint32_t i) |
| void | ts::PutUInt40 (void *p, uint64_t i) |
| void | ts::PutUInt40BE (void *p, uint64_t i) |
| void | ts::PutUInt40LE (void *p, uint64_t i) |
| void | ts::PutUInt48 (void *p, uint64_t i) |
| void | ts::PutUInt48BE (void *p, uint64_t i) |
| void | ts::PutUInt48LE (void *p, uint64_t i) |
| void | ts::PutUInt56 (void *p, uint64_t i) |
| void | ts::PutUInt56BE (void *p, uint64_t i) |
| void | ts::PutUInt56LE (void *p, uint64_t i) |
| void | ts::PutUInt64 (void *p, uint64_t i) |
| void | ts::PutUInt64BE (void *p, uint64_t i) |
| void | ts::PutUInt64LE (void *p, uint64_t i) |
| void | ts::PutUInt8 (void *p, uint8_t i) |
| template<typename INT> requires std::integral<INT> | |
| std::vector< INT > | ts::Range (INT first, INT last) |
| UString | ts::RemoveAccent (UChar c) |
| template<class CONTAINER> | |
| void | ts::RemoveDuplicates (CONTAINER &container) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::round_down (INT x, INT f) |
| template<typename INT> requires std::integral<INT> | |
| INT | ts::round_up (INT x, INT f) |
| template<typename INT> requires std::integral<INT> | |
| constexpr INT | ts::rounded_div (INT a, INT b) |
| template<class T, class U> | |
| void | ts::set_default (std::optional< T > &opt, const U &value) |
| template<typename INT> requires std::integral<INT> | |
| constexpr void | ts::sign_reduce (INT &num, INT &den) |
| template<typename INT> requires std::integral<INT> | |
| constexpr const UChar * | ts::SignedDescription () |
| template<typename INT> requires std::signed_integral<INT> | |
| INT | ts::SignExtend (INT x, size_t bits) |
| int32_t | ts::SignExtend24 (int32_t x) |
| int64_t | ts::SignExtend40 (int64_t x) |
| int64_t | ts::SignExtend48 (int64_t x) |
| int64_t | ts::SignExtend56 (int64_t x) |
| template<class CONTAINER> | |
| size_t | ts::SmallestSize (const CONTAINER &container) |
| bool | ts::StartsWith (const void *area, size_t area_size, const void *prefix, size_t prefix_size) |
| template<typename INT> requires std::integral<INT> | |
| constexpr bool | ts::sub_overflow (INT a, INT b) noexcept |
| template<typename INT> requires std::integral<INT> | |
| void | ts::thow_neg_overflow (INT a) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::throw_add_overflow (INT a, INT b) |
| template<typename INT1, typename INT2> requires std::integral<INT1> && std::integral<INT2> | |
| void | ts::throw_bound_check (INT2 x) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::throw_div_zero (INT den) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::throw_mul_overflow (INT a, INT b) |
| template<typename INT> requires std::integral<INT> | |
| void | ts::throw_sub_overflow (INT a, INT b) |
| int | ts::ToDigit (UChar c, int base=10, int default_value=-1) |
| UString | ts::ToHTML (UChar c) |
| UChar | ts::ToLower (UChar c) |
| template<typename INT> requires std::integral<INT> | |
| Tristate | ts::ToTristate (INT i) |
| UChar | ts::ToUpper (UChar c) |
| UChar | ts::TrailingSurrogate (char32_t cp) |
| uint32_t | ts::UCharacteristics (UChar c) |
| uint64_t | ts::UID () |
| bool | ts::Xor (bool arg1, bool arg2) |
Variables | |
| template<typename T> | |
| constexpr bool | ts::dependent_false = std::false_type::value |
| constexpr std::uintmax_t | ts::FS_ERROR = static_cast<std::uintmax_t>(-1) |
| constexpr size_t | ts::MAX_POWER_10 = 19 |
| constexpr size_t | ts::NPOS = size_t(-1) |
C++ language features and design patterns.
| #define TS_GCC |
Defined when the compiler is GCC, also known as "GNU C", or a GCC-compatible compiler.
| #define TS_GCC_ONLY |
Defined when the compiler is exactly GCC, also known as "GNU C", not a GCC-compatible compiler.
| #define TS_MSC |
Defined when the compiler is Microsoft C/C++, the default compiler in the Microsoft Visual Studio environment. Also used on command line and batch file as the cl command.
| #define TS_GCC_VERSION |
GCC version, encoded as an integer. Example: 40801 for GCC 4.8.1. Undefined when the compiler is not GCC or its version is unknown.
| #define TS_CPLUSPLUS |
Level of C++ language, same as predefined __cplusplus, but safe with MSVC.
Microsoft-specific ways of signaling the language level: With Visual Studio 2017, there are flags such as /std:c++14 to specify the level of language. However, __cplusplus is still set to 199711L. It is unclear if this is a bug or if __cplusplus is not set because the C++11/14/17 standards all not super-completely implemented. The Microsoft-specific symbol _MSVC_LANG is defined to describe a "good-enough" level of standard which is fine for us.
The current version of TSDuck requires C++20 at least (GCC 11, clang 5, Visual Studio 2017 15.8).
| #define TS_CXX20 |
Defined when the compiler is compliant with C++20.
| #define TS_CXX23 |
Defined when the compiler is compliant with C++23.
| #define TS_ASAN |
Defined when the code is compiled for ASAN, the Address Sanitizer.
| #define TS_UBSAN |
Defined when the code is compiled for UBSAN, the Undefined Behaviour Sanitizer. Notes:
| #define TS_TSAN |
Defined when the code is compiled for TSAN, the Thread Sanitizer. Notes:
| #define TS_WINDOWS |
Defined when compiled for a Microsoft Windows target platform.
| #define TS_UNIX |
Defined when compiled for any flavor of UNIX target platforms.
This symbol comes in addition to the specific symbol for the target platform (TS_LINUX, etc.)
| #define TS_LINUX |
Defined when compiled for a Linux target platform.
| #define TS_BSD |
Defined when compiled for a BSD target platform (FreeBSD, OpenBSD, NetBSD, DragonFlyBSD).
| #define TS_FREEBSD |
Defined when compiled for a FreeBSD target platform.
| #define TS_OPENBSD |
Defined when compiled for an OpenBSD target platform.
| #define TS_NETBSD |
Defined when compiled for a NetBSD target platform.
| #define TS_DRAGONFLYBSD |
Defined when compiled for a DragonFlyBSD target platform.
| #define TS_MAC |
Defined when compiled for a macOS target platform.
| #define TS_CYGWIN |
Defined when compiled for a Cygwin target platform.
| #define TS_ANDROID |
Defined when compiled for an Android target platform.
| #define TS_I386 |
Defined when the target processor architecture is Intel IA-32, also known as x86.
| #define TS_X86_64 |
Defined when the target processor architecture is the 64-bit extension of the IA-32 architecture, also known as AMD-64 or Intel x86-64.
| #define TS_ARM32 |
Defined when the target processor architecture is 32-bit ARM.
| #define TS_ARM64 |
Defined when the target processor architecture is 64-bit ARM.
| #define TS_ASM_ARM64 |
Defined when the target processor architecture is 64-bit ARM and inline assembler is allowed. This is typically true with GCC and Clang but false with MSC.
| #define TS_POWERPC |
Defined when the target processor architecture is 32-bit Power PC.
| #define TS_POWERPC64 |
Defined when the target processor architecture is 64-bit Power PC.
| #define TS_SPARC |
Defined when the target processor architecture is Sun SPARC architecture.
| #define TS_MIPS |
Defined when the target processor architecture is 32-bit MIPS architecture.
| #define TS_MIPS64 |
Defined when the target processor architecture is 64-bit MIPS architecture.
| #define TS_RISCV64 |
Defined when the target processor architecture is 64-bit RISC-V.
| #define TS_S390X |
Defined when the target processor architecture is S390X.
| #define TS_LOONGARCH32 |
Defined when the target processor architecture is 32-bit LoongArch architecture.
| #define TS_LOONGARCH64 |
Defined when the target processor architecture is 64-bit LoongArch architecture.
| #define TS_STRICT_MEMORY_ALIGN 1 |
Defined when the CPU requires strict memory alignment (address must be a multiple of the data size).
| #define TS_NO_ARM_CRC32_INSTRUCTIONS |
Define TS_NO_ARM_CRC32_INSTRUCTIONS from the command line if you want to disable the usage of Arm64 CRC32 instructions.
| #define TSDUCK_STATIC_PLUGINS |
User-defined macro to enable static linking of plugins.
If TSDUCK_STATIC_PLUGINS is defined, typically on the compilation command line, all plugins are linked statically. Dynamic loading of plugins is disabled.
| #define TSDUCK_STATIC_LIBRARY |
Applications which link against the TSDuck static library.
Applications which link against the TSDuck static library should define TSDUCK_STATIC_LIBRARY. This symbol can be used to force external references.
TSDUCK_STATIC_LIBRARY enforces TSDUCK_STATIC_PLUGINS.
| #define TSDUCK_STATIC |
User-defined macro to enable full static linking.
If TSDUCK_STATIC is defined, typically on the compilation command line, the code is compiled and linked statically, including system libraries. On Linux, this is not recommended since a few features such as IP address resolution are disabled.
TSDUCK_STATIC enforces TSDUCK_STATIC_LIBRARY and TSDUCK_STATIC_PLUGINS.
| #define TS_STRINGIFY | ( | x | ) |
This macro transforms the value of a macro parameter into the equivalent string literal.
This is a very specific macro. It is typically used only inside the definition of another macro. It is similar to the # token in the preprocessor but has a slightly different effect. The # token transforms the text of a macro parameter into a string while TS_STRINGIFY transforms the value of a macro parameter into a string, after all preprocessing substitutions.
The following example illustrates the difference between the # token and TS_STRINGIFY:
This will print:
| #define TS_USTRINGIFY | ( | x | ) |
This macro transforms the value of a macro parameter into the equivalent 16-bit Unicode string literal.
This macro is equivalent to TS_STRINGIFY() except that the string literal is of the for u"..." instead of "..."
| #define TS_UNIQUE_NAME | ( | prefix | ) |
This macro generates a unique name based on the source line number. It is typically used in more complex macro definitions. These complex macros should be defined on one single line. All invocations of TS_UNIQUE_NAME generate the same symbol when placed one the same source line.
| prefix | Prefix for the symbol. Using different prefixes, several distinct unique identifiers can be used on the same line. |
| #define TS_PRAGMA | ( | directive | ) |
Helper macro for the C++11 keyword _Pragma.
With the C++11 standard, the keywork _Pragma uses a string literal. However, Visual C++ does not support it as of Visual Studio 2019. Instead, it uses the non-standard keyword __pragma with a plain directive (not a string).
| directive | The directive for the pragma. Plain directive, not a string literal. |
Examples (depending on compilers):
| #define TS_PUSH_WARNING | ( | ) |
Save the compiler's warnings reporting.
| #define TS_POP_WARNING | ( | ) |
Restore the compiler's warnings reporting from a previous TS_PUSH_WARNING().
| #define TS_LLVM_NOWARNING | ( | name | ) |
Disable a warning with the LLVM/clang compiler (does nothing on other compilers).
| name | Warning name, as used after command line option -W |
| #define TS_GCC_NOWARNING | ( | name | ) |
Disable a warning with the GCC compiler (does nothing on other compilers).
| name | Warning name, as used after command line option -W |
| #define TS_MSC_NOWARNING | ( | num | ) |
Disable a warning with the Microsoft Visual C++ compiler (does nothing on other compilers).
| num | Warning number. |
| #define TS_PARTIAL_SWITCH_BEGIN | ( | ) |
Allow switch-case on enumeration values without listing all possible values.
When using a switch-case on an enumeration value, the highest warning level detects missing values in the "case" alternatives. This is usually a good thing because it detects which code needs to be modified when new values are added to an enumeration type. However, there are exceptional situations where a "switch" structure only uses a subset of the declared enumeration values, on purpose. In that case, the corresponding warning must be temporarily disabled for all compilers around the "switch" structure. The macros TS_PARTIAL_SWITCH_BEGIN() and TS_PARTIAL_SWITCH_END() encapsulates this.
Example:
| #define TS_PARTIAL_SWITCH_END | ( | ) |
Mark the end of a switch-case on partial enumeration values. Must be preceded by TS_PARTIAL_SWITCH_BEGIN().
| #define TS_UNALIGNED |
| #define TS_NO_OPTIMIZE |
| #define TS_NO_SANITIZE_SIGNED_OVERFLOW |
Attribute to explicitly disable UBSan on integer overflow in a function.
Example:
| #define TS_FUNCTION |
Definition of the name of the current function. This is typically func but recent compilers have "pretty" names for C++.
| #define TS_SLINE TS_STRINGIFY(__LINE__) |
String version of LINE, the source code line number.
| #define TS_NOMOVE | ( | classname | ) |
A macro to disable object move in the declaration of a class. The move constructor and assignment are explicitly deleted.
| classname | Name of the enclosing class. |
| #define TS_NOCOPY | ( | classname | ) |
A macro to disable object copy in the declaration of a class. The copy and move constructors and assignments are explicitly deleted.
| classname | Name of the enclosing class. |
| #define TS_NOBUILD_NOCOPY | ( | classname | ) |
A macro to disable default constructor and object copy in the declaration of a class. The default, copy and move constructors and assignments are explicitly deleted.
| classname | Name of the enclosing class. |
| #define TS_NO_DEFAULT_CONSTRUCTORS | ( | classname | ) |
A macro to disable default constructors in the declaration of a class. The default, copy and move constructors are explicitly deleted.
| classname | Name of the enclosing class. |
| #define TS_DEFAULT_ASSIGMENTS | ( | classname | ) |
A macro to declare the default assignment operators in the declaration of a class.
| classname | Name of the enclosing class. |
| #define TS_DEFAULT_COPY_MOVE | ( | classname | ) |
A macro to declare the default copy and move constructors and assignment operators in the declaration of a class.
| classname | Name of the enclosing class. |
| #define TS_RULE_OF_FIVE | ( | classname, | |
| dtor_attributes ) |
A macro to apply the C++ "rule of five" in the declaration of a class. An explicit virtual destructor is declared. The copy and move constructors and assignments are defaulted.
| classname | Name of the enclosing class. |
| dtor_attributes | Post attributes for the destructor. |
| #define TS_INTERFACE | ( | classname | ) |
A macro to declare the basic operators in the declaration of an interface class.
| classname | Name of the enclosing class. |
| #define TS_SUBINTERFACE | ( | classname | ) |
A macro to declare the basic operators in the declaration of an interface class which is a subclass of another interface.
| classname | Name of the enclosing class. |
| #define TS_NOCOPY_INTERFACE | ( | classname | ) |
A macro to declare the basic operators in the declaration of a non-copyable interface class.
| classname | Name of the enclosing class. |
| #define TS_NOCOPY_SUBINTERFACE | ( | classname | ) |
A macro to declare the basic operators in the declaration of a non-copyable interface class which is a subclass of another interface.
| classname | Name of the enclosing class. |
| #define TS_SINGLETON | ( | classname | ) |
Singleton class declaration.
A singleton is a design pattern where a class can have only one instance. The macro TS_SINGLETON must be used inside the singleton class declaration.
| classname | Name of the singleton class, without namespace or outer class name. |
Example code:
The class becomes a singleton. The default constructor is private. Use static Instance() method to get the instance of the singleton.
| #define TS_DEFINE_SINGLETON | ( | fullclassname | ) |
Singleton class definition.
The macro TS_DEFINE_SINGLETON must be used in the implementation of a singleton class.
| fullclassname | Fully qualified name of the singleton class. |
| #define TS_STATIC_REFERENCE | ( | suffix, | |
| addr ) |
This macro generates a reference to some address (string literal, external symbol, etc.) The reference is a unique static symbol which is otherwise unused. The difficulty is to make sure that the compiler will not optimize away this data (it is local and unused).
| suffix | Some unique suffix if the macro is invoked several times on the same line. |
| addr | An address to reference (string literal, external symbol, etc.) |
| #define TS_ENABLE_BITMASK_OPERATORS | ( | T | ) |
This macro enables bitmask operators on an enumeration type.
| T | An enumeration type or enumeration class. |
Example:
| #define TS_DECLARE_EXCEPTION | ( | name | ) |
This macro declares an exception as a subclass of ts::Exception.
| [in] | name | Name of the exception class. |
| #define TS_SRCLOC __FILE__ ":" TS_SLINE ": " |
Locate the source of the exception in the Exception constructor message string.
| #define TS_ZERO | ( | var | ) |
Zeroing an plain memory variable. Do not use with instances of C++ classes.
| [out] | var | Name of a variable. |
| #define TS_REGISTER_CHRONO_UNIT | ( | classname, | |
| ... ) |
Registration of a new std::chrono::duration unit name.
| classname | An instance of std::chrono::duration. |
| using ts::BoolPredicate = bool (*)(bool, bool) |
Declaration of a boolean predicate with two arguments.
| using ts::MonoBoolPredicate = bool (*)(bool) |
Declaration of a boolean predicate with one argument.
| using ts::MultiBoolPredicate = bool (*)(std::initializer_list<bool>) |
Declaration of a boolean predicate with a variable number of arguments.
| using ts::ObjectPtr = std::shared_ptr<Object> |
Safe pointer for Object (thread-safe).
| using ts::deciseconds = cn::duration<cn::milliseconds::rep, std::deci> |
A derivative of std::chrono::duration for deciseconds (1/10 of a second).
| using ts::monotonic_time = cn::time_point<cn::steady_clock> |
Definition of a monotonic time.
| using ts::ieee_float32_t = typename ieee_float<32, 8, 23>::type |
32-bit IEEE floating point type.
| using ts::ieee_float64_t = typename ieee_float<64, 11, 52>::type |
64-bit IEEE floating point type.
| using ts::ieee_float80_t = typename ieee_float<80, 15, 64>::type |
80-bit IEEE floating point type.
Some systems cannot implement this. It is typically only available on Intel platforms. On other platforms, this type is void..
| using ts::ieee_float128_t = typename ieee_float<128, 15, 112>::type |
128-bit IEEE floating point type.
Some systems cannot implement this. GCC and Clang on Intel use a 80-bit floating type for long double. In that case, this type is void.
| using ts::underlying_type_t = typename underlying_type<T>::type |
Helper type for ts::underlying_type.
| T | An integral or enumeration type. |
| using ts::make_signed_t = typename make_signed<T>::type |
Helper type for ts::make_signed.
| T | An integral or floating-point type. |
| using ts::int_max_t = typename int_max<INT>::type |
Helper type for ts::int_max.
| INT | An integer type, any size, signed or unsigned. |
| using ts::UChar = char16_t |
UTF-16 character.
| using ts::UStringVector = std::vector<UString> |
Vector of strings.
| using ts::UStringList = std::list<UString> |
List of strings.
| using ts::UStringToUStringMap = std::map<UString, UString> |
Map of strings, indexed by string.
| using ts::UStringToUStringMultiMap = std::multimap<UString, UString> |
Multi-map of strings, indexed by string.
|
strong |
|
strong |
Tristate boolean. More generally:
| Enumerator | |
|---|---|
| Maybe | Undefined value (and more generally all negative values). |
| False | Built-in false. |
| True | True value (and more generally all positive values). |
|
strong |
Enumeration type used to indicate the replacement policy in containers of data structures. Each data structure is supposed to have a unique "identifier" inside the container. The exact interpretation of each policy may depend on the service which uses it. Can be used as a bit mask.
| enum ts::CaseSensitivity |
| anonymous enum : uint32_t |
Characteristics of a character. Bitwise combinations are allowed.
| Enumerator | |
|---|---|
| CCHAR_LETTER | The character is a letter. |
| CCHAR_DIGIT | The character is a digit. |
| CCHAR_HEXA | The character is an hexadecimal digit. |
| CCHAR_LATIN | The character is latin. |
| CCHAR_GREEK | The character is greek. |
| CCHAR_HEBREW | The character is hebrew. |
| CCHAR_ARABIC | The character is arabic. |
| CCHAR_THAI | The character is thai. |
| CCHAR_CYRILLIC | The character is cyrillic. |
| CCHAR_CDIACRIT | The character is combining diacritical. |
| CCHAR_SPACE | The character is space. |
| CCHAR_PRINT | The character is printable. |
| CCHAR_BASE64 | The character is Base64. |
| enum ts::StringDirection |
| enum ts::StringComparison : uint32_t |
| bool ts::EnumerateCombinations | ( | const std::set< T > & | values, |
| const std::set< T > & | fixed, | ||
| size_t | size, | ||
| UnaryPredicate | predicate ) |
Enumerate all 'k'-elements combinations of a 'n'-elements set.
This function enumerates all possible sets of 'k' elements within a set of 'n' elements. For each combination, a user-supplied predicate is invoked. The signature of the predicate function should be equivalent to the following:
The signature does not need to have const, but the function must not modify the set which is passed to it. The function returns true when the search for more combinations shall continue and false when the search shall prematurely stops.
| T | The type of elements in the sets. |
| UnaryPredicate | The type of unary predicate returning true or false from one set of elements of type T. |
| values | The set of all values from which the combinations are built. The size of values is the 'n' in the sentence "enumerate all 'k'-elements combinations of a 'n'-elements set". |
| fixed | The set of fixed values which must be present in all combinations. To enumerate all possible combinations in values, use an empty set for fixed. If fixed is not empty, the predicate will be invoked only with combinations of values which contains all elements in fixed. |
| size | The size (number of elements) of the combinations to enumerate. This is the 'k' in the sentence "enumerate all 'k'-elements combinations of a 'n'-elements set". |
| predicate | The unary predicate to invoke for each possible combination of size elements in values. If predicate returns true, the search for more combination continues. When predicate returns false, the search is interrupted immediately and no more combination is proposed. Example: When the application searches for a combination which matches specific properties, the application's predicate returns false when a matching combination is found to avoid looking for additional combinations. |
| bool ts::AppendUnique | ( | CONTAINER & | container, |
| const ELEMENT & | e ) |
Append an element into a container if not already present in the container.
If the element e is not already present in the container, e is appended at the end of the container. Otherwise, the container is left unmodified.
| ELEMENT | Any type. |
| CONTAINER | A container class of ELEMENT as defined by the C++ Standard Template Library (STL). |
| [in,out] | container | A container of ELEMENT. |
| [in] | e | An element to conditionally append to container. |
| void ts::RemoveDuplicates | ( | CONTAINER & | container | ) |
Remove duplicated elements in a container.
When duplicates are found, this first occurrence is kept, aothers are removed.
The predefined function std::unique() removes duplicated elements when they are consecutive only. This function removes all duplicates.
| CONTAINER | A container class as defined by the C++ Standard Template Library (STL). |
| [in,out] | container | A container into which duplicates are removed. |
| size_t ts::SmallestSize | ( | const CONTAINER & | container | ) |
Get the size of the smallest object in a container of objects having a size() method.
| CONTAINER | A container class as defined by the C++ Standard Template Library (STL). |
| [in] | container | A container of objects. |
| size_t ts::LargestSize | ( | const CONTAINER & | container | ) |
Get the size of the largest object in a container of objects having a size() method.
| CONTAINER | A container class as defined by the C++ Standard Template Library (STL). |
| [in] | container | A container of objects. |
| std::list< typename MAP::key_type > ts::MapKeysList | ( | const MAP & | container | ) |
Get the list of all keys in a map.
| MAP | A map container class as defined by the C++ Standard Template Library (STL). |
| [in] | container | A container of objects. |
| std::set< typename MAP::key_type > ts::MapKeysSet | ( | const MAP & | container | ) |
Get the set of all keys in a map.
| MAP | A map container class as defined by the C++ Standard Template Library (STL). |
| [in] | container | A container of objects. |
| std::list< typename MAP::mapped_type > ts::MapValuesList | ( | const MAP & | container | ) |
Get the list of all values in a map.
| MAP | A map container class as defined by the C++ Standard Template Library (STL). |
| [in] | container | A container of objects. |
| std::basic_ostream< typename OSTREAM::char_type, TRAITS > & ts::IOManipulator | ( | std::basic_ostream< typename OSTREAM::char_type, TRAITS > & | strm, |
| OSTREAM &(OSTREAM::* | func )() ) |
I/O manipulator for subclasses of std::basic_ostream.
The standard C++ library contains support for I/O manipulators on std::basic_ios, std::basic_istream and std::basic_ostream but not for their subclasses. This template function is a support routine for I/O manipulators on subclasses.
Sample usage:
| OSTREAM | A subclass of std::basic_ostream. |
| [in,out] | strm | The stream of class OSTREAM to manipulate. |
| [in] | func | A pointer to member function in OSTREAM. This method shall take no parameter and return a reference to the OSTREAM object. |
| std::basic_ostream< typename OSTREAM::char_type, TRAITS > & operator<< | ( | std::basic_ostream< typename OSTREAM::char_type, TRAITS > & | strm, |
| const ts::IOManipulatorProxy< OSTREAM, PARAM, TRAITS > & | proxy ) |
An overload of operator "<<" on std::basic_ostream for ts::IOManipulatorProxy.
| OSTREAM | A subclass of std::basic_ostream. |
| PARAM | The type of the parameter for the manipulator. |
| [in,out] | strm | The stream of class OSTREAM to manipulate. |
| [in] | proxy | The ts::IOManipulatorProxy object. |
|
inline |
|
inline |
|
inline |
BoolPredicate "and". Note this predicate does not allow the traditional "&&" short circuit. The two arguments are always evaluated.
| [in] | arg1 | A boolean argument. |
| [in] | arg2 | A boolean argument. |
|
inline |
BoolPredicate "or". Note this predicate does not allow the traditional "||" short circuit. The two arguments are always evaluated.
| [in] | arg1 | A boolean argument. |
| [in] | arg2 | A boolean argument. |
|
inline |
BoolPredicate "nand".
| [in] | arg1 | A boolean argument. |
| [in] | arg2 | A boolean argument. |
|
inline |
BoolPredicate "nor".
| [in] | arg1 | A boolean argument. |
| [in] | arg2 | A boolean argument. |
|
inline |
BoolPredicate "exclusive or".
| [in] | arg1 | A boolean argument. |
| [in] | arg2 | A boolean argument. |
| bool ts::MultiAnd | ( | std::initializer_list< bool > | args | ) |
MultiBoolPredicate "and".
| [in] | args | A variable list of boolean arguments. |
| bool ts::MultiOr | ( | std::initializer_list< bool > | args | ) |
MultiBoolPredicate "or".
| [in] | args | A variable list of boolean arguments. |
|
inline |
MultiBoolPredicate "nand".
| [in] | args | A variable list of boolean arguments. |
|
inline |
MultiBoolPredicate "nor".
| [in] | args | A variable list of boolean arguments. |
| uint64_t ts::UID | ( | ) |
Generate a new 64-bit UID, unique integer.
|
inline |
Set a default value in a std::optional object, if there is none.
| T | The type of the optional object. |
| U | The type of the default value to set. |
| [in,out] | opt | The optinal object to set. |
| [in] | value | The value to set in obj if it is not initialized. |
| UString ts::ClassName | ( | const std::type_index | index | ) |
Get the name of a class from the type_index of a class. The result may be not portable.
| [in] | index | The type_index of a class. |
|
inline |
Get the name of a class from the type_info of an object. The result may be not portable.
| [in] | info | The type_info of an object. |
|
inline |
Check if a byte is a valid Binary Coded Decimal (BCD) value.
| [in] | b | A byte containing a BCD-encoded value. |
|
inline |
Return the decimal value of a Binary Coded Decimal (BCD) encoded byte.
| [in] | b | A byte containing a BCD-encoded value. |
|
inline |
Return a one-byte Binary Coded Decimal (BCD) representation of an integer
| [in] | i | The integer to encode (must be in 0..99). |
| uint32_t ts::DecodeBCD | ( | const uint8_t * | bcd, |
| size_t | bcd_count, | ||
| bool | left_justified = true ) |
Return the decimal value of a Binary Coded Decimal (BCD) encoded string.
| [in] | bcd | Address of an array of bytes. |
| [in] | bcd_count | Number of BCD digits (bcd_count / 2 bytes). Note that bcd_count can be even. |
| [in] | left_justified | When true (the default), the first BCD digit starts in the first half of the first byte. When false and bcd_count is odd, the first BCD digit starts in the second half of the first byte. Ignored when bcd_count is even. |
| void ts::EncodeBCD | ( | uint8_t * | bcd, |
| size_t | bcd_count, | ||
| uint32_t | value, | ||
| bool | left_justified = true, | ||
| uint8_t | pad_nibble = 0 ) |
Encode a Binary Coded Decimal (BCD) string.
| [out] | bcd | Address of an array of bytes. Its size must be at least (bcd_count + 1) / 2 bytes. |
| [in] | bcd_count | Number of BCD digits. Note that bcd_count can be even. |
| [in] | value | The value to encode. |
| [in] | left_justified | When true (the default), the first BCD digit starts in the first half of the first byte. When false and bcd_count is odd, the first BCD digit starts in the second half of the first byte. This parameter is ignored when bcd_count is even. |
| [in] | pad_nibble | A value in the range 0..15 to set in the unused nibble when bcd_count is odd. This is the first half of the first byte when left_justified is false. This is the second half of the last byte when left_justified is true. This parameter is ignored when bcd_count is even. |
| void ts::BCDToString | ( | std::string & | str, |
| const uint8_t * | bcd, | ||
| size_t | bcd_count, | ||
| int | decimal, | ||
| bool | left_justified = true ) |
Decode a string representation of a variable-length Binary Coded Decimal (BCD) encoded integer.
| [out] | str | Returned string representation. |
| [in] | bcd | Address of an array of bytes. |
| [in] | bcd_count | Number of BCD digits (bcd_count / 2 bytes). Note that bcd_count can be even. |
| [in] | decimal | Indicates the position of the virtual decimal point (-1: none, 0: before first digit, 1: after first digit, etc.) |
| [in] | left_justified | When true (the default), the first BCD digit starts in the first half of the first byte. When false and bcd_count is odd, the first BCD digit starts in the second half of the first byte. Ignored when bcd_count is even. |
|
inline |
Perform a sign extension on 24 bit integers.
| [in] | x | A 32-bit integer containing a signed 24-bit value to extend. |
|
inline |
Perform a sign extension on 40 bit integers.
| [in] | x | A 64-bit integer containing a signed 40-bit value to extend. |
|
inline |
Perform a sign extension on 48 bit integers.
| [in] | x | A 64-bit integer containing a signed 48-bit value to extend. |
|
inline |
Perform a sign extension on 56 bit integers.
| [in] | x | A 64-bit integer containing a signed 56-bit value to extend. |
|
inline |
Inlined function performing byte swap on 16-bit integer data. This function unconditionally swaps bytes within an unsigned integer, regardless of the native endianness.
| [in] | x | A 16-bit unsigned integer to swap. |
|
inline |
Inlined function performing byte swap on 24-bit integer data. This function unconditionally swaps bytes within an unsigned integer, regardless of the native endianness.
| [in] | x | A 32-bit unsigned integer containing a 24-bit value to swap. |
|
inline |
Inlined function performing byte swap on 32-bit integer data. This function unconditionally swaps bytes within an unsigned integer, regardless of the native endianness.
| [in] | x | A 32-bit unsigned integer to swap. |
|
inline |
Inlined function performing byte swap on 64-bit integer data. This function unconditionally swaps bytes within an unsigned integer, regardless of the native endianness.
| [in] | x | A 64-bit unsigned integer to swap. |
|
inline |
Inlined function performing conditional byte swap on 16-bit integer data to obtain the data in big endian representation.
| [in] | x | A 16-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 16-bit integer data to obtain the data in big endian representation.
| [in] | x | A 16-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 24-bit integer data to obtain the data in big endian representation.
| [in] | x | A 32-bit unsigned integer containing a 24-bit value to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 24-bit integer data to obtain the data in big endian representation.
| [in] | x | A 32-bit unsigned integer containing a 24-bit value to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 32-bit integer data to obtain the data in big endian representation.
| [in] | x | A 32-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 32-bit integer data to obtain the data in big endian representation.
| [in] | x | A 32-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 64-bit integer data to obtain the data in big endian representation.
| [in] | x | A 64-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 64-bit integer data to obtain the data in big endian representation.
| [in] | x | A 64-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 16-bit integer data to obtain the data in little endian representation.
| [in] | x | A 16-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 24-bit integer data to obtain the data in little endian representation.
| [in] | x | A 32-bit unsigned integer containing a 24-bit value to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 32-bit integer data to obtain the data in little endian representation.
| [in] | x | A 32-bit unsigned integer to conditionally swap. |
|
inline |
Inlined function performing conditional byte swap on 64-bit integer data to obtain the data in little endian representation.
| [in] | x | A 64-bit unsigned integer to conditionally swap. |
Template function performing conditional byte swap on integer data to obtain the data in big endian representation.
| INT | Some integer type. |
| [in] | x | An INT to conditionally swap. |
Template function performing conditional byte swap on integer data to obtain the data in little endian representation.
| INT | Some integer type. |
| [in] | x | An INT to conditionally swap. |
Template function performing conditional byte swap on integer data to obtain the data in big endian representation.
| INT | Some integer type. |
| [in] | x | An INT to conditionally swap. |
|
inline |
Display operator for displayable objects.
| [in,out] | strm | Where to output the content. |
| [in] | obj | The object to display. |
|
inline |
This template function compares two floating point values for approximated equality.
| T | A floating point type. |
| a | First value to test. |
| b | Second value to test. |
| epsilon | The approximation tolerance. |
|
inlineconstexpr |
This template function checks if a floating point type matches a given IEEE represenation.
| T | An floating point type, any size or representation. |
| storage_bits | Expected size in bits of the type. |
| exponent_bits | Expected number of bits in the exponent. |
| mantissa_bits | Expected number of bits in the mantissa. |
|
inline |
Function getting a 32-bit IEEE float from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit IEEE float in big endian representation. |
|
inline |
Function getting a 32-bit IEEE float from serialized data in little endian representation.
| [in] | p | An address pointing to a 32-bit IEEE float in little endian representation. |
|
inline |
Function getting a 32-bit IEEE float from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit IEEE float in big endian representation. |
|
inline |
Function getting a 64-bit IEEE float from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit IEEE float in big endian representation. |
|
inline |
Function getting a 64-bit IEEE float from serialized data in little endian representation.
| [in] | p | An address pointing to a 64-bit IEEE float in little endian representation. |
|
inline |
Function getting a 64-bit IEEE float from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit IEEE float in big endian representation. |
|
inline |
Function serializing a 32-bit IEEE float data in big endian representation.
| [out] | p | An address where to serialize the 32-bit IEEE float. |
| [in] | f | The 32-bit IEEE float in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 32-bit IEEE float data in little endian representation.
| [out] | p | An address where to serialize the 32-bit IEEE float. |
| [in] | f | The 32-bit IEEE float in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 32-bit IEEE float data in big endian representation.
| [out] | p | An address where to serialize the 32-bit IEEE float. |
| [in] | f | The 32-bit IEEE float in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 64-bit IEEE float data in big endian representation.
| [out] | p | An address where to serialize the 64-bit IEEE float. |
| [in] | f | The 64-bit IEEE float in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 64-bit IEEE float data in little endian representation.
| [out] | p | An address where to serialize the 64-bit IEEE float. |
| [in] | f | The 64-bit IEEE float in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 64-bit IEEE float data in big endian representation.
| [out] | p | An address where to serialize the 64-bit IEEE float. |
| [in] | f | The 64-bit IEEE float in native byte order to serialize in big endian representation. |
|
inlineconstexpr |
Statically check if a integral or enum value is negative.
| T | An integral or enumeration type. |
| [in] | x | A value of type T. |
Absolute value of integer types, also working on unsigned types.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | An integer value. |
|
inlineconstexprnoexcept |
Integer cross-type bound check.
| INT1 | An integer type. |
| INT2 | An integer type. |
| [in] | x | An integer value of type INT2. |
|
inlineconstexpr |
Bounded integer cast.
| INT1 | An integer type. |
| INT2 | An integer type. |
| [in] | x | An integer value of type INT2. |
| void ts::throw_bound_check | ( | INT2 | x | ) |
Throw an exception if an integer value does not fall into the range of another integer type.
| INT1 | An integer type. |
| INT2 | An integer type. |
| [in] | x | An integer value of type INT2. |
| std::out_of_range | When the value of x is ouside the limits of type INT1. |
|
inline |
In debug mode, throw an exception if an integer value does not fall into the range of another integer type. If the macro DEBUG is not defined, this function does nothing.
| INT1 | An integer type. |
| INT2 | An integer type. |
| [in] | x | An integer value of type INT2. |
| std::out_of_range | When the value of x is ouside the limits of type INT1. |
Check if an integer addition generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
Check if an integer substraction generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
|
inlineconstexprnoexcept |
Check if the negation (opposite sign) of an integer generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | An integer value. |
Check if an integer multiplication generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
Throw an exception if an integer addition generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
| std::overflow_error | When a + b generated an overflow. |
Throw an exception if an integer substraction generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
| std::overflow_error | When a - b generated an overflow. |
Throw an exception if the negation (opposite sign) of an integer generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | An integer value. |
| std::overflow_error | When -a generates an overflow. |
Throw an exception if an integer multiplication generates an overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
| std::overflow_error | When a * b generated an overflow. |
Throw an exception if the denominator of an integer division is zero.
| INT | An integer type, any size, signed or unsigned. |
| [in] | den | The denominator of an integer division. |
| std::underflow_error | When den is zero. |
In debug mode, throw an exception if an integer addition generates an overflow. If the macro DEBUG is not defined, this function does nothing.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
| std::overflow_error | When a + b generated an overflow. |
In debug mode, throw an exception if an integer substraction generates an overflow. If the macro DEBUG is not defined, this function does nothing.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
| std::overflow_error | When a - b generated an overflow. |
In debug mode, throw an exception if the negation (opposite sign) of an integer generates an overflow. If the macro DEBUG is not defined, this function does nothing.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | An integer value. |
| std::overflow_error | When -a generates an overflow. |
In debug mode, throw an exception if an integer multiplication generates an overflow. If the macro DEBUG is not defined, this function does nothing.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
| std::overflow_error | When a * b generated an overflow. |
In debug mode, throw an exception if the denominator of an integer division is zero. If the macro DEBUG is not defined, this function does nothing.
| INT | An integer type, any size, signed or unsigned. |
| [in] | den | The denominator of an integer division. |
| std::underflow_error | When den is zero. |
Perform a bounded addition without overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
Perform a bounded subtraction without overflow.
| INT | An integer type, any size, signed or unsigned. |
| [in] | a | First integer. |
| [in] | b | Second integer. |
Round x down to previous multiple of a factor f.
| INT | An integer type. |
| [in] | x | An integer value. |
| [in] | f | A factor (its absolute value is used if negative). |
Round x up to next multiple of a factor f.
| INT | An integer type. |
| [in] | x | An integer value. |
| [in] | f | A factor (its absolute value is used if negative). |
Perform a sign extension on any subset of a signed integer.
| INT | A signed integer type. |
| [in] | x | An integer containing a signed value in some number of LSB. |
| [in] | bits | Number of least significant bits containing a signed value. |
| size_t ts::MaxDecimalWidth | ( | size_t | typeSize, |
| size_t | digitSeparatorSize = 0 ) |
Compute the maximum width of the decimal representation of an integer type.
| [in] | typeSize | Size of the integer type in bytes (result of sizeof). |
| [in] | digitSeparatorSize | Size in characters of the digit-grouping separator. |
| size_t ts::MaxHexaWidth | ( | size_t | typeSize, |
| size_t | digitSeparatorSize = 0 ) |
Compute the maximum width of the hexadecimal representation of an integer type.
| [in] | typeSize | Size of the integer type in bytes (result of sizeof). |
| [in] | digitSeparatorSize | Size in characters of the digit-grouping separator. |
Get the size in bits of an integer value. This is the minimum number of bits to represent the value up to its most-significant '1' bit.
| INT | An integer type. |
| [in] | x | An integer containing a signed value in some number of LSB. |
Get the mask to select a given number of least significant bits in an integer value.
| INT | An integer type. |
| [in] | bits | Number of least significant bits to select. Zero means all bits. |
|
inlineconstexpr |
Get the signed/unsigned qualifier of an integer type as a string.
| INT | An integer type. |
Compute a greatest common denominator (GCD).
| INT | An integer type. |
| [in] | x | An integer. |
| [in] | y | An integer. |
| uint64_t ts::Power10 | ( | size_t | pow | ) |
Get a power of 10 using a fast lookup table.
| [in] | pow | The requested power of 10. |
|
inline |
Zeroing a memory area.
| [out] | addr | Address of a memory area to fill with zeroes. |
| [in] | size | Size in bytes of the memory area. |
|
inline |
Setting a memory area. Similar to std::memset() but explicitly does nothing on zero size.
| [out] | addr | Address of a memory area to fill with value. |
| [in] | value | Byte value to set in all area. |
| [in] | size | Size in bytes of the memory area. |
|
inline |
Copying a memory area. Similar to std::memcpy() and std::memmove() but explicitly does nothing on zero size. Overlapping source and destination are allowed, as with std::memmove().
| [out] | dest | Base address of destination area. |
| [in] | src | Base address of source area. |
| [in] | size | Size in bytes of the memory area. |
|
inline |
Comparing two memory areas. Similar to std::memcmp() but explicitly does nothing on zero size.
| [in] | addr1 | Base address of first area. |
| [in] | addr2 | Base address of second area. |
| [in] | size | Size in bytes of the memory area. |
|
inline |
Check if two memory areas are identical.
| [in] | addr1 | Base address of first area. |
| [in] | addr2 | Base address of second area. |
| [in] | size | Size in bytes of the memory area. |
| void ts::MemXor | ( | void * | dest, |
| const void * | src1, | ||
| const void * | src2, | ||
| size_t | size ) |
Compute an exclusive or over memory areas. The input and output areas can overlap only if they start at the same address.
| [out] | dest | Destination start address. |
| [in] | src1 | Start address of the first area. |
| [in] | src2 | Start address of the second area. |
| [in] | size | Size in bytes of the memory areas. |
| bool ts::StartsWith | ( | const void * | area, |
| size_t | area_size, | ||
| const void * | prefix, | ||
| size_t | prefix_size ) |
Check if a memory area starts with the specified prefix.
| [in] | area | Address of a memory area to check. |
| [in] | area_size | Size in bytes of the memory area. |
| [in] | prefix | Address of the content of the prefix to check. |
| [in] | prefix_size | Size in bytes of the prefix. |
| const uint8_t * ts::LocatePattern | ( | const void * | area, |
| size_t | area_size, | ||
| const void * | pattern, | ||
| size_t | pattern_size ) |
Locate a pattern into a memory area.
| [in] | area | Address of a memory area to check. |
| [in] | area_size | Size in bytes of the memory area. |
| [in] | pattern | Address of the content of the pattern to check. |
| [in] | pattern_size | Size in bytes of the pattern. |
| const uint8_t * ts::LocateZeroZero | ( | const void * | area, |
| size_t | area_size, | ||
| uint8_t | third ) |
Locate a 3-byte pattern 00 00 XY into a memory area. This is a specialized version of LocatePattern().
| [in] | area | Address of a memory area to check. |
| [in] | area_size | Size in bytes of the memory area. |
| [in] | third | Third byte of the pattern, after 00 00. |
| bool ts::IdenticalBytes | ( | const void * | area, |
| size_t | area_size ) |
Check if a memory area contains all identical byte values.
| [in] | area | Address of a memory area to check. |
| [in] | area_size | Size in bytes of the memory area. |
|
inline |
Function getting a 16-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit unsigned integer in big endian representation. |
| uint32_t ts::GetUInt24BE | ( | const void * | p | ) |
Function getting a 24-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 32-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit unsigned integer in big endian representation. |
| uint64_t ts::GetUInt40BE | ( | const void * | p | ) |
Function getting a 40-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 40-bit unsigned integer in big endian representation. |
| uint64_t ts::GetUInt48BE | ( | const void * | p | ) |
Function getting a 48-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 48-bit unsigned integer in big endian representation. |
| uint64_t ts::GetUInt56BE | ( | const void * | p | ) |
Function getting a 56-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 56-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 64-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 16-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 16-bit unsigned integer in little endian representation. |
| uint32_t ts::GetUInt24LE | ( | const void * | p | ) |
Function getting a 24-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 24-bit unsigned integer in little endian representation. |
|
inline |
Function getting a 32-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 32-bit unsigned integer in little endian representation. |
| uint64_t ts::GetUInt40LE | ( | const void * | p | ) |
Function getting a 40-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 40-bit unsigned integer in little endian representation. |
| uint64_t ts::GetUInt48LE | ( | const void * | p | ) |
Function getting a 48-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 48-bit unsigned integer in little endian representation. |
| uint64_t ts::GetUInt56LE | ( | const void * | p | ) |
Function getting a 56-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 56-bit unsigned integer in little endian representation. |
|
inline |
Function getting a 64-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 64-bit unsigned integer in little endian representation. |
|
inline |
Function serializing a 16-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 16-bit unsigned integer. |
| [in] | i | The 16-bit unsigned integer in native byte order to serialize in big endian representation. |
| void ts::PutUInt24BE | ( | void * | p, |
| uint32_t | i ) |
Function serializing a 24-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 24-bit unsigned integer. |
| [in] | i | The 24-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 32-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 32-bit unsigned integer. |
| [in] | i | The 32-bit unsigned integer in native byte order to serialize in big endian representation. |
| void ts::PutUInt40BE | ( | void * | p, |
| uint64_t | i ) |
Function serializing a 40-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 40-bit unsigned integer. |
| [in] | i | The 40-bit unsigned integer in native byte order to serialize in big endian representation. |
| void ts::PutUInt48BE | ( | void * | p, |
| uint64_t | i ) |
Function serializing a 48-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 48-bit unsigned integer. |
| [in] | i | The 48-bit unsigned integer in native byte order to serialize in big endian representation. |
| void ts::PutUInt56BE | ( | void * | p, |
| uint64_t | i ) |
Function serializing a 56-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 56-bit unsigned integer. |
| [in] | i | The 48-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 64-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 64-bit unsigned integer. |
| [in] | i | The 64-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 16-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 16-bit unsigned integer. |
| [in] | i | The 16-bit unsigned integer in native byte order to serialize in little endian representation. |
| void ts::PutUInt24LE | ( | void * | p, |
| uint32_t | i ) |
Function serializing a 24-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 24-bit unsigned integer. |
| [in] | i | The 24-bit unsigned integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 32-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 32-bit unsigned integer. |
| [in] | i | The 32-bit unsigned integer in native byte order to serialize in little endian representation. |
| void ts::PutUInt40LE | ( | void * | p, |
| uint64_t | i ) |
Function serializing a 40-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 40-bit unsigned integer. |
| [in] | i | The 40-bit unsigned integer in native byte order to serialize in little endian representation. |
| void ts::PutUInt48LE | ( | void * | p, |
| uint64_t | i ) |
Function serializing a 48-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 48-bit unsigned integer. |
| [in] | i | The 48-bit unsigned integer in native byte order to serialize in little endian representation. |
| void ts::PutUInt56LE | ( | void * | p, |
| uint64_t | i ) |
Function serializing a 56-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 56-bit unsigned integer. |
| [in] | i | The 56-bit unsigned integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 64-bit unsigned integer data in little endian representation.
| [out] | p | An address where to serialize the 64-bit unsigned integer. |
| [in] | i | The 64-bit unsigned integer in native byte order to serialize in little endian representation. |
|
inline |
Function getting an 8-bit unsigned integer from serialized data. Note: There is no byte-swapping in the serialization / deserialization of 8-bit integer data. But this function is provided for consistency.
| [in] | p | An address pointing to an 8-bit unsigned integer. |
|
inline |
Function getting a 16-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 24-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 32-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 40-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 40-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 48-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 48-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 56-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 56-bit unsigned integer in big endian representation. |
|
inline |
Function getting a 64-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit unsigned integer in big endian representation. |
|
inline |
Function getting an 8-bit signed integer from serialized data. Note: There is no byte-swapping in the serialization / deserialization of 8-bit integer data. But this function is provided for consistency.
| [in] | p | An address pointing to an 8-bit signed integer. |
|
inline |
Function getting a 16-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit signed integer in big endian representation. |
|
inline |
Function getting a 24-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit signed integer in big endian representation. |
|
inline |
Function getting a 32-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit signed integer in big endian representation. |
|
inline |
Function getting a 64-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit signed integer in big endian representation. |
|
inline |
Function getting a 16-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit signed integer in big endian representation. |
|
inline |
Function getting a 24-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit signed integer in big endian representation. |
|
inline |
Function getting a 32-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit signed integer in big endian representation. |
|
inline |
Function getting a 40-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 40-bit signed integer in big endian representation. |
|
inline |
Function getting a 48-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 48-bit signed integer in big endian representation. |
|
inline |
Function getting a 56-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 56-bit signed integer in big endian representation. |
|
inline |
Function getting a 64-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit signed integer in big endian representation. |
|
inline |
Function getting a 16-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 16-bit signed integer in little endian representation. |
|
inline |
Function getting a 24-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 24-bit signed integer in little endian representation. |
|
inline |
Function getting a 32-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 32-bit signed integer in little endian representation. |
|
inline |
Function getting a 40-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 40-bit signed integer in little endian representation. |
|
inline |
Function getting a 48-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 48-bit signed integer in little endian representation. |
|
inline |
Function getting a 56-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 56-bit signed integer in little endian representation. |
|
inline |
Function getting a 64-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 64-bit signed integer in little endian representation. |
|
inline |
Function getting an 8-bit unsigned integer from serialized data.
Note: There is no byte-swapping in the serialization / deserialization of 8-bit integer data. But this function is provided for consistency.
| [in] | p | An address pointing to an 8-bit unsigned integer. |
| [out] | i | The 8-bit unsigned integer at p. |
|
inline |
Function getting a 16-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit unsigned integer in big endian representation. |
| [out] | i | The 16-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 24-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit unsigned integer in big endian representation. |
| [out] | i | The 32-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 32-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit unsigned integer in big endian representation. |
| [out] | i | The 32-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 40-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 40-bit unsigned integer in big endian representation. |
| [out] | i | The 64-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 48-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 48-bit unsigned integer in big endian representation. |
| [out] | i | The 64-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 56-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 56-bit unsigned integer in big endian representation. |
| [out] | i | The 64-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 64-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit unsigned integer in big endian representation. |
| [out] | i | The 64-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 16-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit unsigned integer in big endian representation. |
| [out] | i | The 16-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 24-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit unsigned integer in big endian representation. |
| [out] | i | The 32-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 32-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit unsigned integer in big endian representation. |
| [out] | i | The 32-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 64-bit unsigned integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit unsigned integer in big endian representation. |
| [out] | i | The 64-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 16-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 16-bit unsigned integer in little endian representation. |
| [out] | i | The 16-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 24-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 24-bit unsigned integer in little endian representation. |
| [out] | i | The 24-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 32-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 32-bit unsigned integer in little endian representation. |
| [out] | i | The 32-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting a 64-bit unsigned integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 64-bit unsigned integer in little endian representation. |
| [out] | i | The 64-bit unsigned integer in native byte order, deserialized from p. |
|
inline |
Function getting an 8-bit signed integer from serialized data.
Note: There is no byte-swapping in the serialization / deserialization of 8-bit integer data. But this function is provided for consistency.
| [in] | p | An address pointing to an 8-bit signed integer. |
| [out] | i | The 8-bit signed integer at p. |
|
inline |
Function getting a 16-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit signed integer in big endian representation. |
| [out] | i | The 16-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 24-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit signed integer in big endian representation. |
| [out] | i | The 24-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 32-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit signed integer in big endian representation. |
| [out] | i | The 32-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 64-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit signed integer in big endian representation. |
| [out] | i | The 64-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 16-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 16-bit signed integer in big endian representation. |
| [out] | i | The 16-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 24-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 24-bit signed integer in big endian representation. |
| [out] | i | The 24-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 32-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 32-bit signed integer in big endian representation. |
| [out] | i | The 32-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 64-bit signed integer from serialized data in big endian representation.
| [in] | p | An address pointing to a 64-bit signed integer in big endian representation. |
| [out] | i | The 64-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 16-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 16-bit signed integer in little endian representation. |
| [out] | i | The 16-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 24-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 24-bit signed integer in little endian representation. |
| [out] | i | The 32-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 32-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 32-bit signed integer in little endian representation. |
| [out] | i | The 32-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function getting a 64-bit signed integer from serialized data in little endian representation.
| [in] | p | An address pointing to a 64-bit signed integer in little endian representation. |
| [out] | i | The 64-bit signed integer in native byte order, deserialized from p. |
|
inline |
Function serializing an 8-bit unsigned integer data.
Note: There is no byte-swapping in the serialization / deserialization of 8-bit integer data. But this function is provided for consistency.
| [out] | p | An address where to serialize the 8-bit unsigned integer. |
| [in] | i | The 8-bit unsigned integer to serialize. |
|
inline |
Function serializing a 16-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 16-bit unsigned integer. |
| [in] | i | The 16-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 24-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 24-bit unsigned integer. |
| [in] | i | The 24-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 32-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 32-bit unsigned integer. |
| [in] | i | The 32-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 40-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 40-bit unsigned integer. |
| [in] | i | The 40-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 48-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 48-bit unsigned integer. |
| [in] | i | The 48-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 56-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 56-bit unsigned integer. |
| [in] | i | The 48-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 64-bit unsigned integer data in big endian representation.
| [out] | p | An address where to serialize the 64-bit unsigned integer. |
| [in] | i | The 64-bit unsigned integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing an 8-bit signed integer data.
Note: There is no byte-swapping in the serialization / deserialization of 8-bit integer data. But this function is provided for consistency.
| [out] | p | An address where to serialize the 8-bit signed integer. |
| [in] | i | The 8-bit signed integer to serialize. |
|
inline |
Function serializing a 16-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 16-bit signed integer. |
| [in] | i | The 16-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 24-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 24-bit signed integer. |
| [in] | i | The 32-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 32-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 32-bit signed integer. |
| [in] | i | The 32-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 64-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 64-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 16-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 16-bit signed integer. |
| [in] | i | The 16-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 24-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 24-bit signed integer. |
| [in] | i | The 32-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 32-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 32-bit signed integer. |
| [in] | i | The 32-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 40-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 40-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 48-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 48-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 56-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 56-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 64-bit signed integer data in big endian representation.
| [out] | p | An address where to serialize the 64-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in big endian representation. |
|
inline |
Function serializing a 16-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 16-bit signed integer. |
| [in] | i | The 16-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 24-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 24-bit signed integer. |
| [in] | i | The 32-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 32-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 32-bit signed integer. |
| [in] | i | The 32-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 40-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 40-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 48-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 48-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 56-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 56-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
Function serializing a 64-bit signed integer data in little endian representation.
| [out] | p | An address where to serialize the 64-bit signed integer. |
| [in] | i | The 64-bit signed integer in native byte order to serialize in little endian representation. |
|
inline |
|
inline |
|
inline |
| INT ts::GetIntVarBE | ( | const void * | p, |
| size_t | size ) |
Template function getting a variable-length integer from serialized data in big endian representation.
| INT | Some integer type. |
| [in] | p | An address pointing to an INT in big endian representation. |
| [in] | size | Size in bytes of the integer. Must be 1 to 8. |
| INT ts::GetIntVarLE | ( | const void * | p, |
| size_t | size ) |
Template function getting a variable-length integer from serialized data in little endian representation.
| INT | Some integer type. |
| [in] | p | An address pointing to an INT in little endian representation. |
| [in] | size | Size in bytes of the integer. Must be 1 to 8. |
|
inline |
Template function getting a variable-length integer from serialized data in big endian representation.
| INT | Some integer type. |
|
inline |
Template function getting a variable-length integer from serialized data in little endian representation.
| INT | Some integer type. |
| void ts::PutIntVarBE | ( | void * | p, |
| size_t | size, | ||
| INT | i ) |
Template function serializing a variable-length integer data in big endian representation.
| INT | Some integer type. |
| [out] | p | An address where to serialize the integer. |
| [in] | size | Size in bytes of the integer. Must be 1 to 8. |
| [in] | i | The INT in native byte order to serialize in big endian representation. |
| void ts::PutIntVarLE | ( | void * | p, |
| size_t | size, | ||
| INT | i ) |
Template function serializing a variable-length integer data in little endian representation.
| INT | Some integer type. |
| [out] | p | An address where to serialize the integer. |
| [in] | size | Size in bytes of the integer. Must be 1 to 8. |
| [in] | i | The INT in native byte order to serialize in little endian representation. |
|
inline |
Template function getting a variable-length integer from serialized data in big endian representation.
| INT | Some integer type. |
| [in] | p | An address pointing to an INT in big endian representation. |
| [in] | size | Size in bytes of the integer. Must be 1 to 8. |
|
inline |
Template function getting a variable-length integer from serialized data in big endian representation.
| INT | Some integer type. |
|
inline |
Template function serializing a variable-length integer data in big endian representation.
| INT | Some integer type. |
| [out] | p | An address where to serialize the integer. |
| [in] | size | Size in bytes of the integer. Must be 1 to 8. |
| [in] | i | The INT in native byte order to serialize in big endian representation. |
|
inline |
Template function getting a template-fixed-length integer from serialized data in big endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
| [in] | p | An address pointing to an INT in big endian representation. |
|
inline |
Template function getting a template-fixed-length integer from serialized data in little endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
| [in] | p | An address pointing to an INT in little endian representation. |
|
inline |
Template function getting a template-fixed-length integer from serialized data in big endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
|
inline |
Template function getting a template-fixed-length integer from serialized data in little endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
|
inline |
Template function serializing a template-fixed-length integer data in big endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
| [out] | p | An address where to serialize the integer. |
| [in] | i | The INT in native byte order to serialize in big endian representation. |
|
inline |
Template function serializing a template-fixed-length integer data in little endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
| [out] | p | An address where to serialize the integer. |
| [in] | i | The INT in native byte order to serialize in little endian representation. |
|
inline |
Template function getting a template-fixed-length integer from serialized data in big endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
| [in] | p | An address pointing to an INT in big endian representation. |
|
inline |
Template function getting a template-fixed-length integer from serialized data in big endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
|
inline |
Template function serializing a template-fixed-length integer data in big endian representation.
| SIZE | Size in bytes of the integer. Must be 1 to 8. |
| INT | Some integer type. |
| [out] | p | An address where to serialize the integer. |
| [in] | i | The INT in native byte order to serialize in big endian representation. |
| uint32_t ts::UCharacteristics | ( | UChar | c | ) |
Get the characteristics of a character.
| [in] | c | A character. |
|
inline |
Check if a character is a space.
| [in] | c | A character. |
|
inline |
Check if a character is printable according to the current C locale.
| [in] | c | A character. |
|
inline |
Check if a character is a letter.
| [in] | c | A character. |
|
inline |
Check if a character is a decimal digit.
| [in] | c | A character. |
|
inline |
Check if a character is alphanumerical.
| [in] | c | A character. |
|
inline |
Check if a character is an hexadecimal digit.
| [in] | c | A character. |
| int ts::ToDigit | ( | UChar | c, |
| int | base = 10, | ||
| int | default_value = -1 ) |
Convert a character representing a multi-base integer digit into the corresponding integer value. Characters '0'..'9' are converted to 0..9. Characters 'a'..'z' and 'A'..'Z' are converted to 10..35. This function can be used to convert decimal digits, hexadecimal and any other base up to base 36.
| [in] | c | A character to convert. |
| [in] | base | The base of the integer representation, must be in the range 2 to 36. |
| [in] | default_value | The value to return on invalid character. |
| bool ts::IsLower | ( | UChar | c | ) |
Check if a character is a lower case letter.
| [in] | c | A character. |
| bool ts::IsUpper | ( | UChar | c | ) |
Check if a character is an upper case letter.
| [in] | c | A character. |
Convert a character to lowercase.
| [in] | c | A character to convert to lowercase. |
Convert a character to uppercase.
| [in] | c | A character to convert to uppercase. |
| bool ts::Match | ( | UChar | c1, |
| UChar | c2, | ||
| CaseSensitivity | cs ) |
Check two characters match, case sensitive or insensitive.
| [in] | c1 | First character. |
| [in] | c2 | Second character. |
| [in] | cs | Case sensitivity of the comparision. |
|
inline |
| bool ts::IsAccented | ( | UChar | c | ) |
Check if a character contains an accent.
| [in] | c | A character. |
Remove all forms of accent or composition from a character.
| [in] | c | A character. |
|
inline |
Check if a character is a combining diacritical character. Such a character, when printed, is combined with the preceding character.
| [in] | c | A character. |
|
inline |
Check if a character is a "leading surrogate" value.
In the most general form, a Unicode character needs 21 bits to be represented. However, most characters can be represented using 16 bits and are implemented as only one 16-bit value in UTF-16 or one single UChar. Any Unicode character which cannot be represented within 16 bits needs two consecutive UChar values in an UTF-16 string. These two values are called a "surrogate pair". The first ("leading") and second ("trailing") value of a surrogate pair are specially coded and can be identified as such.
| [in] | c | A character. |
|
inline |
Check if a character is a "trailing surrogate" value.
| [in] | c | A character. |
|
inline |
Check if a 32-bit Unicode code point needs a surrogate pair in UTF-16 representation.
| [in] | cp | A 32-bit Unicode code point. |
|
inline |
Compute the first part of the surrogate pair of a 32-bit Unicode code point (which needs a surrogate pair).
| [in] | cp | A 32-bit Unicode code point. |
|
inline |
Compute the second part of the surrogate pair of a 32-bit Unicode code point (which needs a surrogate pair).
| [in] | cp | A 32-bit Unicode code point. |
Build a 32-bit Unicode code point from a surrogate pair.
| [in] | lead | First part of the surrogate pair. |
| [in] | trail | Second part of the surrogate pair. |
Convert a character into its corresponding HTML sequence.
| [in] | c | A character. |
Convert the body on an HTML entity into a character.
| [in] | entity | The body on an HTML entity (e.g. "amp" for sequence "\&"). |
Build a precombined character from its base letter and non-spacing diacritical mark.
| [in] | letter | The base letter. |
| [in] | mark | The non-spacing diacritical mark. |
Decompose a precombined character into its base letter and non-spacing diacritical mark.
| [in] | c | A character. |
| [out] | letter | The base letter for c. |
| [out] | mark | The non-spacing diacritical mark for c. |
|
constexpr |
Constant meaning "no size", "not found" or "do not resize". An alternative value for the standard std::string::npos value. Required on Windows to avoid linking issue.
|
constexpr |
A "false" expression which is built from a template type T.
| T | A type, any type but typically a template parameter. |
With C++20, structures with a cascade of "if constexpr" are good replacements for conditional compilation or SFINAE templates. At the end such a cascade, it is common to trap unsupported cases using a "static_assert(false)". However, static_assert(false) is "ill-formed, no diagnostic required", meaning that it may compile, or not. It depends on the compiler. To avoid this, we build a non-literal expression which always evaluates to false but depends on a type, typically a template parameter type.
|
constexpr |
This error code is returned by some functions in std::filesystem.
|
constexpr |
Largest representable power of 10 in integer types. Assuming that no integer type is larger than 64 bits, 10^19 is the largest unsigned power of 10.