Skip to content

scram::mef::TableRange

Wraps the element container tables into ranges of plain references to hide the memory smart or raw pointers. More...

#include <element.h>

Public Classes

Name
classiterator <br>The proxy forward iterator to extract values instead of pointers.

Public Types

Name
using std::conditional_t< std::is_const_v< T >, std::add_const_t< deref_type >, deref_type >value_type <br>Value typedefs of the range.
using value_type &reference
using value_type *pointer
using iteratorconst_iterator <br>Phony const iterator for ranges.

Public Functions

Name
boolempty() const<br>The proxy members for the common functionality of the associative table T.
std::size_tsize() const
std::size_tcount(const key_type & key) const
iteratorfind(const key_type & key) const
iteratorbegin() const
iteratorend() const
iteratorcbegin() const
iteratorcend() const
TableRange(T & table)

Detailed Description

cpp
template <class T >
class scram::mef::TableRange;

Wraps the element container tables into ranges of plain references to hide the memory smart or raw pointers.

Template Parameters:

  • T Const or non-const associative container type.

This is similar to boost::range::adaptors::indirect.

This range is used to enforce const correctness by not leaking modifiable elements in the const containers of pointers.

Public Types Documentation

using value_type

cpp
using scram::mef::TableRange< T >::value_type =  std::conditional_t<std::is_const_v<T>, std::add_const_t<deref_type>, deref_type>;

Value typedefs of the range.

using reference

cpp
using scram::mef::TableRange< T >::reference =  value_type&;

using pointer

cpp
using scram::mef::TableRange< T >::pointer =  value_type*;

using const_iterator

cpp
using scram::mef::TableRange< T >::const_iterator =  iterator;

Phony const iterator for ranges.

Public Functions Documentation

function empty

cpp
inline bool empty() const

The proxy members for the common functionality of the associative table T.

function size

cpp
inline std::size_t size() const

function count

cpp
inline std::size_t count(
    const key_type & key
) const

function find

cpp
inline iterator find(
    const key_type & key
) const

function begin

cpp
inline iterator begin() const

function end

cpp
inline iterator end() const

function cbegin

cpp
inline iterator cbegin() const

function cend

cpp
inline iterator cend() const

function TableRange

cpp
inline explicit TableRange(
    T & table
)

Parameters:

  • table The associative container of pointers.

Updated on 2025-11-11 at 16:51:08 +0000