Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. pw::metric::internal::ListWrapper< T > Class Template Reference
Loading...
Searching...
No Matches
pw::metric::internal::ListWrapper< T > Class Template Reference

Overview

template<typename T>
class pw::metric::internal::ListWrapper< T >

Wraps a IntrusiveForwardList to limit the API for use with metrics.

Public Types

using element_type = typename IntrusiveForwardList< T >::element_type
 
using value_type = typename IntrusiveForwardList< T >::value_type
 
using size_type = typename IntrusiveForwardList< T >::size_type
 
using difference_type = typename IntrusiveForwardList< T >::difference_type
 
using reference = typename IntrusiveForwardList< T >::reference
 
using const_reference = typename IntrusiveForwardList< T >::const_reference
 
using pointer = typename IntrusiveForwardList< T >::pointer
 
using const_pointer = typename IntrusiveForwardList< T >::const_pointer
 

Public Member Functions

void push_back (reference value)
 
void push_front (reference value)
 
bool empty () const
 
size_t size () const
 
template<typename F >
F for_each (F f)
 
template<typename F >
F for_each (F f) const
 
pointer find (pw::tokenizer::Token token)
 
const_pointer find (pw::tokenizer::Token token) const
 

Member Function Documentation

◆ find() [1/2]

template<typename T >
pointer pw::metric::internal::ListWrapper< T >::find ( pw::tokenizer::Token  token)
inline

Finds an item by name token.

Returns
A pointer to the first matching item, or nullptr if no match is found.

◆ find() [2/2]

template<typename T >
const_pointer pw::metric::internal::ListWrapper< T >::find ( pw::tokenizer::Token  token) const
inline

Finds an item by name token.

Returns
A const pointer to the first matching item, or nullptr if no match is found.

◆ for_each() [1/2]

template<typename T >
template<typename F >
F pw::metric::internal::ListWrapper< T >::for_each ( F  f)
inline

Iterates over the list and calls the functor f with a reference to each item.

◆ for_each() [2/2]

template<typename T >
template<typename F >
F pw::metric::internal::ListWrapper< T >::for_each ( F  f) const
inline

Iterates over the list and calls the functor f with a const reference to each item.


The documentation for this class was generated from the following file: