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 | |
|---|---|
| class | iterator <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 iterator | const_iterator <br>Phony const iterator for ranges. |
Public Functions
| Name | |
|---|---|
| bool | empty() const<br>The proxy members for the common functionality of the associative table T. |
| std::size_t | size() const |
| std::size_t | count(const key_type & key) const |
| iterator | find(const key_type & key) const |
| iterator | begin() const |
| iterator | end() const |
| iterator | cbegin() const |
| iterator | cend() 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() constThe proxy members for the common functionality of the associative table T.
function size
cpp
inline std::size_t size() constfunction count
cpp
inline std::size_t count(
const key_type & key
) constfunction find
cpp
inline iterator find(
const key_type & key
) constfunction begin
cpp
inline iterator begin() constfunction end
cpp
inline iterator end() constfunction cbegin
cpp
inline iterator cbegin() constfunction cend
cpp
inline iterator cend() constfunction TableRange
cpp
inline explicit TableRange(
T & table
)Parameters:
- table The associative container of pointers.
Updated on 2025-11-11 at 16:51:08 +0000
