JSON Voorhees
Killer JSON for C++
jsonv::detail::generic_container< TStorage > Class Template Reference

A generic container that exposes the traversal and modification operations externally. More...

#include <jsonv/detail/generic_container.hpp>

Public Types

using storage_type = TStorage
 
using size_type = typename storage_type::size_type
 
using value_type = typename storage_type::value_type
 
using difference_type = typename storage_type::difference_type
 
using iterator = typename storage_type::iterator
 
using const_iterator = typename storage_type::const_iterator
 
using reverse_iterator = typename storage_type::reverse_iterator
 
using const_reverse_iterator = typename storage_type::const_reverse_iterator
 
using reference = typename storage_type::reference
 
using const_reference = typename storage_type::const_reference
 
using pointer = typename storage_type::pointer
 
using const_pointer = typename storage_type::const_pointer
 
using allocator_type = typename storage_type::allocator_type
 

Public Member Functions

 generic_container (storage_type data)
 
template<typename TInputIterator >
 generic_container (TInputIterator first, TInputIterator last)
 
 generic_container (const generic_container &)=default
 
generic_containeroperator= (const generic_container &)=default
 
 generic_container (generic_container &&) noexcept=default
 
generic_containeroperator= (generic_container &&)=default
 
size_type size () const
 Get the number of elements. More...
 
bool empty () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator crbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crend () const
 
reference operator[] (size_type idx)
 
const_reference operator[] (size_type idx) const
 
reference at (size_type idx)
 
const_reference at (size_type idx) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void clear ()
 
iterator insert (const_iterator pos, const value_type &x)
 
iterator insert (const_iterator pos, value_type &&x)
 
template<typename TInputIterator >
iterator insert (const_iterator pos, TInputIterator first, TInputIterator last)
 
iterator insert (const_iterator pos, std::initializer_list< value_type > ilist)
 
template<typename... TArgs>
iterator emplace (const_iterator pos, TArgs &&...args)
 
template<typename... TArgs>
void emplace_back (TArgs &&...args)
 
void push_back (const value_type &x)
 
void push_back (value_type &&x)
 
iterator erase (const_iterator pos)
 
iterator erase (const_iterator first, const_iterator last)
 
void pop_back ()
 

Protected Attributes

storage_type _data
 

Detailed Description

template<typename TStorage>
class jsonv::detail::generic_container< TStorage >

A generic container that exposes the traversal and modification operations externally.

Basically, this is just a way to allow deriving from std::vector without actually doing so.

Definition at line 29 of file generic_container.hpp.

Member Function Documentation

template<typename TStorage>
size_type jsonv::detail::generic_container< TStorage >::size ( ) const
inline

Get the number of elements.

Definition at line 65 of file generic_container.hpp.


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