Template Class RTEMbufArray
Defined in File dpdk_wrappers.h
Nested Relationships
Nested Types
Template Parameter Order
typename Elem
size_t N
MbufType type
Class Documentation
-
template<typename Elem, size_t N, MbufType type = MbufType::Raw>
class RTEMbufArray Public Types
-
using owning_value_type = RTEMbufElement<Elem, type>
-
using pointer = value_type*
-
using reference = value_type&
-
using Iterator = BaseIterator<value_type, std::forward_iterator_tag>
-
using ConstIterator = BaseIterator<const value_type, std::forward_iterator_tag>
Public Functions
-
inline ~RTEMbufArray()
-
inline void release()
-
RTEMbufArray(const RTEMbufArray&) = delete
-
RTEMbufArray &operator=(const RTEMbufArray&) = delete
-
inline RTEMbufArray(RTEMbufArray &&other)
-
inline RTEMbufArray &operator=(RTEMbufArray &&other)
-
inline RTEMbufArray insert(RTEMbufArray &&other)
-
inline std::pair<RTEMbufArray, RTEMbufArray> split(size_t index)
Split the array into two.
- Parameters:
index – The index into the array to split at. E.g. if index is 7 then first array will have 7 elements and the second size() - 7.
- Returns:
An std::pair<RTEPktMbufArray, RTEPktMbufArray>.
-
inline size_t size() const
-
inline size_t free_cnt() const
-
inline constexpr size_t capacity() const
-
inline double_pointer data()
-
inline const_reference operator[](size_t i) const
-
inline Elem &get_data(size_t i)
-
inline const Elem &get_data(size_t i) const
-
inline ConstIterator begin() const
-
inline ConstIterator end() const
-
inline const_reference front() const
-
inline const_reference back() const
-
inline std::optional<owning_value_type> pop()
-
inline std::optional<owning_value_type> push(owning_value_type &&elem)
Public Static Functions
-
template<typename T>
static inline tl::expected<RTEMbufArray, int> init(RTEMempool<T, type> &mempool, const size_t count, const Elem &value)
-
template<typename T>
static inline tl::expected<RTEMbufArray, int> init(RTEMempool<T, type> &mempool, const size_t count)
-
template<typename T>
static inline tl::expected<RTEMbufArray, int> init(RTEMempool<T, type> &mempool)
-
template<typename value_type_, typename iterator_category_>
struct BaseIterator Public Types
-
using iterator_category = iterator_category_
-
using difference_type = std::ptrdiff_t
-
using value_type = value_type_
-
using pointer = value_type*
-
using reference = value_type&
Public Functions
-
inline explicit BaseIterator()
-
inline BaseIterator(double_pointer ptrs_)
-
inline BaseIterator &operator++()
-
inline BaseIterator operator++(int)
Friends
-
inline friend bool operator==(const BaseIterator &a, const BaseIterator &b)
-
inline friend bool operator!=(const BaseIterator &a, const BaseIterator &b)
-
using iterator_category = iterator_category_
-
using owning_value_type = RTEMbufElement<Elem, type>