rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
beast::unit_test::detail::const_container< Container > Class Template Reference

Adapter to constrain a container interface. More...

#include <const_container.h>

Public Types

using value_type = typename cont_type::value_type
 
using size_type = typename cont_type::size_type
 
using difference_type = typename cont_type::difference_type
 
using iterator = typename cont_type::const_iterator
 
using const_iterator = typename cont_type::const_iterator
 

Public Member Functions

bool empty () const
 Returns true if the container is empty.
 
size_type size () const
 Returns the number of items in the container.
 
const_iterator begin () const
 Returns forward iterators for traversal.
 
const_iterator cbegin () const
 
const_iterator end () const
 
const_iterator cend () const
 

Protected Member Functions

cont_typecont ()
 
cont_type const & cont () const
 

Private Types

using cont_type = Container
 

Private Attributes

cont_type m_cont
 

Detailed Description

template<class Container>
class beast::unit_test::detail::const_container< Container >

Adapter to constrain a container interface.

The interface allows for limited read only operations. Derived classes provide additional behavior.

Definition at line 17 of file const_container.h.

Member Typedef Documentation

◆ cont_type

template<class Container >
using beast::unit_test::detail::const_container< Container >::cont_type = Container
private

Definition at line 20 of file const_container.h.

◆ value_type

template<class Container >
using beast::unit_test::detail::const_container< Container >::value_type = typename cont_type::value_type

Definition at line 38 of file const_container.h.

◆ size_type

template<class Container >
using beast::unit_test::detail::const_container< Container >::size_type = typename cont_type::size_type

Definition at line 39 of file const_container.h.

◆ difference_type

template<class Container >
using beast::unit_test::detail::const_container< Container >::difference_type = typename cont_type::difference_type

Definition at line 40 of file const_container.h.

◆ iterator

template<class Container >
using beast::unit_test::detail::const_container< Container >::iterator = typename cont_type::const_iterator

Definition at line 41 of file const_container.h.

◆ const_iterator

template<class Container >
using beast::unit_test::detail::const_container< Container >::const_iterator = typename cont_type::const_iterator

Definition at line 42 of file const_container.h.

Member Function Documentation

◆ cont() [1/2]

template<class Container >
cont_type & beast::unit_test::detail::const_container< Container >::cont ( )
protected

Definition at line 26 of file const_container.h.

◆ cont() [2/2]

template<class Container >
cont_type const & beast::unit_test::detail::const_container< Container >::cont ( ) const
protected

Definition at line 32 of file const_container.h.

◆ empty()

template<class Container >
bool beast::unit_test::detail::const_container< Container >::empty ( ) const

Returns true if the container is empty.

Definition at line 46 of file const_container.h.

◆ size()

template<class Container >
size_type beast::unit_test::detail::const_container< Container >::size ( ) const

Returns the number of items in the container.

Definition at line 53 of file const_container.h.

◆ begin()

template<class Container >
const_iterator beast::unit_test::detail::const_container< Container >::begin ( ) const

Returns forward iterators for traversal.

Definition at line 61 of file const_container.h.

◆ cbegin()

template<class Container >
const_iterator beast::unit_test::detail::const_container< Container >::cbegin ( ) const

Definition at line 67 of file const_container.h.

◆ end()

template<class Container >
const_iterator beast::unit_test::detail::const_container< Container >::end ( ) const

Definition at line 73 of file const_container.h.

◆ cend()

template<class Container >
const_iterator beast::unit_test::detail::const_container< Container >::cend ( ) const

Definition at line 79 of file const_container.h.

Member Data Documentation

◆ m_cont

template<class Container >
cont_type beast::unit_test::detail::const_container< Container >::m_cont
private

Definition at line 22 of file const_container.h.