This class contains a collection of static functions for calculating the streamed length of simple types when using DescriptorIO, FileIO and StreamedIO. More...
#include <DwmIOUtils.hh>
Static Public Member Functions | |
| static uint64_t | StreamedLength (char c) |
| Returns the number of bytes that would be written if we called Write() for a char. | |
| static uint64_t | StreamedLength (uint8_t c) |
| Returns the number of bytes that would be written if we called Write() for a uint8_t. | |
| static uint64_t | StreamedLength (bool b) |
| Returns the number of bytes that would be written if we called Write() member for a bool. | |
| static uint64_t | StreamedLength (int16_t val) |
Returns the number of bytes that would be written if we called Write() for an int16_t. | |
| static uint64_t | StreamedLength (uint16_t val) |
Returns the number of bytes that would be written if we called Write() for a uint16_t. | |
| static uint64_t | StreamedLength (int32_t val) |
Returns the number of bytes that would be written if we called Write() for an int32_t. | |
| static uint64_t | StreamedLength (uint32_t val) |
Returns the number of bytes that would be written if we called Write() for a uint32_t. | |
| static uint64_t | StreamedLength (int64_t val) |
Returns the number of bytes that would be written if we called Write() for an int64_t. | |
| static uint64_t | StreamedLength (uint64_t val) |
Returns the number of bytes that would be written if we called Write() for a uint64_t. | |
| static uint64_t | StreamedLength (float val) |
| Returns the number of bytes that should be written if we call Write() for a float. | |
| static uint64_t | StreamedLength (double val) |
| Returns the number of bytes that should be written if we call Write() for a double. | |
| static uint64_t | StreamedLength (const std::string &s) |
| Returns the number of bytes that should be written if we call Write() for a string. | |
| template<typename _firstT , typename _secondT > | |
| static uint64_t | StreamedLength (const std::pair< _firstT, _secondT > &p) |
| Returns the number of bytes that should be written if we call Write() for a pair<_firstT, _secondT> | |
| template<typename _keyT , typename _valueT , typename _Compare , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::map< _keyT, _valueT, _Compare, _Alloc > &m) |
| Returns the number of bytes that should be written if we call Write() for a map<_keyT, _valueT> | |
| template<typename _keyT , typename _valueT , typename _Compare , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::multimap< _keyT, _valueT, _Compare, _Alloc > &m) |
| Returns the number of bytes that should be written if we call Write() for a multimap<_keyT, _valueT> | |
| template<typename _valueT , size_t N> | |
| static uint64_t | StreamedLength (const std::array< _valueT, N > &a) |
| Returns the number of bytes that should be written if we call Write() for an array<_valueT,N> | |
| template<typename _valueT , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::vector< _valueT, _Alloc > &v) |
| Returns the number of bytes that should be written if we call Write() for a vector<_valueT> | |
| template<typename _valueT , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::deque< _valueT, _Alloc > &d) |
| Returns the number of bytes that should be written if we call Write() for a deque<_valueT> | |
| template<typename _valueT , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::list< _valueT, _Alloc > &l) |
| Returns the number of bytes that should be written if we call Write() for a list<_valueT> | |
| template<typename _valueT , typename _Compare , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::set< _valueT, _Compare, _Alloc > &l) |
| Returns the number of bytes that should be written if we call Write() for a set<_valueT> | |
| template<typename _valueT , typename _Compare , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::multiset< _valueT, _Compare, _Alloc > &l) |
| Returns the number of bytes that should be written if we call Write() for a multiset<_valueT> | |
| template<typename T , typename... Args> | |
| static uint64_t | VarStreamedLength (const T &t, Args... args) |
| template<typename T , typename... Args> | |
| static uint64_t | StreamedLength (const std::tuple< T, Args... > &t) |
| Returns the number of bytes that should be written if we call Write() for a tuple. | |
| template<typename T > | |
| static uint64_t | TupleStreamedLength (const T &t) |
| T must be a tuple. | |
| static uint64_t | StreamedLength (const std::monostate &sm) |
| template<typename... Ts> | |
| static uint64_t | StreamedLength (const std::variant< Ts... > &v) |
| template<typename _keyT , typename _valueT , typename _Hash , typename _Pred , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::unordered_map< _keyT, _valueT, _Hash, _Pred, _Alloc > &m) |
| template<typename _keyT , typename _valueT , typename _Hash , typename _Pred , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::unordered_multimap< _keyT, _valueT, _Hash, _Pred, _Alloc > &m) |
| template<typename _valueT , typename _Hash , typename _Pred , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::unordered_set< _valueT, _Hash, _Pred, _Alloc > &m) |
| template<typename _valueT , typename _Hash , typename _Pred , typename _Alloc > | |
| static uint64_t | StreamedLength (const std::unordered_multiset< _valueT, _Hash, _Pred, _Alloc > &m) |
| static uint64_t | StreamedLength (const StreamedLengthCapable &sl) |
| static uint64_t | StreamedLength (const HasStreamedLength auto &sl) |
| template<typename... Args> | |
| static uint64_t | StreamedLengthV (const Args &...args) |
This class contains a collection of static functions for calculating the streamed length of simple types when using DescriptorIO, FileIO and StreamedIO.
It also contains functions for calculating the streamed length of strings, deques, lists, vectors, maps, multimaps, sets, multisets, unordered_maps, unordered_multimaps, unordered_sets, unordered_multisets, tuples and variants. We use our member functions to handle simple types in the containers, and function templates to handle other class types. User-defined classes must implement the StreamedLengthCapable interface, since the function templates simply call out to it.
|
inlinestatic |
Returns the number of bytes that would be written if we called Write() for a char.
Should always be 1.
|
inlinestatic |
Returns the number of bytes that would be written if we called Write() for a uint8_t.
Should always be 1.