tudocomp
– The TU Dortmund Compression Framework
tdc::GenericViewBase< T, P > Class Template Reference

#include <GenericViewBase.hpp>

Inheritance diagram for tdc::GenericViewBase< T, P >:
tdc::ConstGenericView< T > tdc::GenericView< T > tdc::io::InputView

Protected Types

using value_type = T
 
using const_reference = const T &
 
using const_pointer = const T *
 
using const_iterator = const_pointer
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using difference_type = ptrdiff_t
 
using size_type = size_t
 

Protected Member Functions

void bound_check (size_t pos) const
 
void bound_check_not_empty () const
 
void debug_bound_check (size_t IF_DEBUG(pos)) const
 
void debug_bound_check_not_empty () const
 
 GenericViewBase (P data, size_t size)
 
 GenericViewBase ()
 
 GenericViewBase (const GenericViewBase &other)
 
 GenericViewBase (const std::vector< T > &other)
 
template<size_t N>
 GenericViewBase (const std::array< T, N > &other)
 
 operator std::vector< T > () const
 
GenericViewBaseoperator= (const GenericViewBase &other)
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
size_type size () const
 
size_type max_size () const
 
bool empty () const
 
const_reference operator[] (size_type n) const
 
const_reference at (size_type n) const
 
const_reference front () const
 
const_reference back () const
 
const value_typedata () const noexcept
 
void pop_back ()
 
void pop_front ()
 
void swap (GenericViewBase &other)
 
void clear ()
 
GenericViewBase slice (size_type from, size_type to=npos) const
 
GenericViewBase substr (size_type pos, size_type len=npos) const
 
void remove_prefix (size_type n)
 
void remove_suffix (size_type n)
 
bool starts_with (const T &c) const
 
bool starts_with (const GenericViewBase< T, const T *> &x) const
 
bool ends_with (const T &c) const
 
bool ends_with (const GenericViewBase< T, const T *> &x) const
 

Static Protected Member Functions

static bool op_eq (const GenericViewBase< T, const T *> &lhs, const GenericViewBase< T, const T *> &rhs)
 
static bool op_not_eq (const GenericViewBase< T, const T *> &lhs, const GenericViewBase< T, const T *> &rhs)
 
static bool op_less (const GenericViewBase< T, const T *> &lhs, const GenericViewBase< T, const T *> &rhs)
 
static bool op_less_eq (const GenericViewBase< T, const T *> &lhs, const GenericViewBase< T, const T *> &rhs)
 
static bool op_greater (const GenericViewBase< T, const T *> &lhs, const GenericViewBase< T, const T *> &rhs)
 
static bool op_greater_eq (const GenericViewBase< T, const T *> &lhs, const GenericViewBase< T, const T *> &rhs)
 

Protected Attributes

m_data
 
size_t m_size
 

Static Protected Attributes

static const size_type npos = -1
 

Friends

class GenericViewBase< T, const T *>
 
class GenericViewBase< T, T *>
 
template<class U , class Q >
void swap (GenericViewBase< U, Q > &lhs, GenericViewBase< U, Q > &rhs)
 

Detailed Description

template<class T, class P>
class tdc::GenericViewBase< T, P >

Definition at line 22 of file GenericViewBase.hpp.

Member Typedef Documentation

◆ const_iterator

template<class T, class P>
using tdc::GenericViewBase< T, P >::const_iterator = const_pointer
protected

Definition at line 30 of file GenericViewBase.hpp.

◆ const_pointer

template<class T, class P>
using tdc::GenericViewBase< T, P >::const_pointer = const T*
protected

Definition at line 29 of file GenericViewBase.hpp.

◆ const_reference

template<class T, class P>
using tdc::GenericViewBase< T, P >::const_reference = const T&
protected

Definition at line 28 of file GenericViewBase.hpp.

◆ const_reverse_iterator

template<class T, class P>
using tdc::GenericViewBase< T, P >::const_reverse_iterator = std::reverse_iterator<const_iterator>
protected

Definition at line 31 of file GenericViewBase.hpp.

◆ difference_type

template<class T, class P>
using tdc::GenericViewBase< T, P >::difference_type = ptrdiff_t
protected

Definition at line 32 of file GenericViewBase.hpp.

◆ size_type

template<class T, class P>
using tdc::GenericViewBase< T, P >::size_type = size_t
protected

Definition at line 33 of file GenericViewBase.hpp.

◆ value_type

template<class T, class P>
using tdc::GenericViewBase< T, P >::value_type = T
protected

Definition at line 27 of file GenericViewBase.hpp.

Constructor & Destructor Documentation

◆ GenericViewBase() [1/5]

template<class T, class P>
tdc::GenericViewBase< T, P >::GenericViewBase ( data,
size_t  size 
)
inlineprotected

Definition at line 69 of file GenericViewBase.hpp.

◆ GenericViewBase() [2/5]

template<class T, class P>
tdc::GenericViewBase< T, P >::GenericViewBase ( )
inlineprotected

Definition at line 70 of file GenericViewBase.hpp.

◆ GenericViewBase() [3/5]

template<class T, class P>
tdc::GenericViewBase< T, P >::GenericViewBase ( const GenericViewBase< T, P > &  other)
inlineprotected

Definition at line 71 of file GenericViewBase.hpp.

◆ GenericViewBase() [4/5]

template<class T, class P>
tdc::GenericViewBase< T, P >::GenericViewBase ( const std::vector< T > &  other)
inlineprotected

Definition at line 73 of file GenericViewBase.hpp.

◆ GenericViewBase() [5/5]

template<class T, class P>
template<size_t N>
tdc::GenericViewBase< T, P >::GenericViewBase ( const std::array< T, N > &  other)
inlineprotected

Definition at line 76 of file GenericViewBase.hpp.

Member Function Documentation

◆ at()

template<class T, class P>
const_reference tdc::GenericViewBase< T, P >::at ( size_type  n) const
inlineprotected

Definition at line 138 of file GenericViewBase.hpp.

◆ back()

template<class T, class P>
const_reference tdc::GenericViewBase< T, P >::back ( ) const
inlineprotected

Definition at line 148 of file GenericViewBase.hpp.

◆ begin()

template<class T, class P>
const_iterator tdc::GenericViewBase< T, P >::begin ( ) const
inlineprotected

Definition at line 89 of file GenericViewBase.hpp.

◆ bound_check()

template<class T, class P>
void tdc::GenericViewBase< T, P >::bound_check ( size_t  pos) const
inlineprotected

Definition at line 40 of file GenericViewBase.hpp.

◆ bound_check_not_empty()

template<class T, class P>
void tdc::GenericViewBase< T, P >::bound_check_not_empty ( ) const
inlineprotected

Definition at line 51 of file GenericViewBase.hpp.

◆ cbegin()

template<class T, class P>
const_iterator tdc::GenericViewBase< T, P >::cbegin ( ) const
inlineprotected

Definition at line 105 of file GenericViewBase.hpp.

◆ cend()

template<class T, class P>
const_iterator tdc::GenericViewBase< T, P >::cend ( ) const
inlineprotected

Definition at line 109 of file GenericViewBase.hpp.

◆ clear()

template<class T, class P>
void tdc::GenericViewBase< T, P >::clear ( )
inlineprotected

Definition at line 174 of file GenericViewBase.hpp.

◆ crbegin()

template<class T, class P>
const_reverse_iterator tdc::GenericViewBase< T, P >::crbegin ( ) const
inlineprotected

Definition at line 113 of file GenericViewBase.hpp.

◆ crend()

template<class T, class P>
const_reverse_iterator tdc::GenericViewBase< T, P >::crend ( ) const
inlineprotected

Definition at line 117 of file GenericViewBase.hpp.

◆ data()

template<class T, class P>
const value_type* tdc::GenericViewBase< T, P >::data ( ) const
inlineprotectednoexcept

Definition at line 153 of file GenericViewBase.hpp.

◆ debug_bound_check()

template<class T, class P>
void tdc::GenericViewBase< T, P >::debug_bound_check ( size_t   IF_DEBUGpos) const
inlineprotected

Definition at line 61 of file GenericViewBase.hpp.

◆ debug_bound_check_not_empty()

template<class T, class P>
void tdc::GenericViewBase< T, P >::debug_bound_check_not_empty ( ) const
inlineprotected

Definition at line 65 of file GenericViewBase.hpp.

◆ empty()

template<class T, class P>
bool tdc::GenericViewBase< T, P >::empty ( ) const
inlineprotected

Definition at line 129 of file GenericViewBase.hpp.

◆ end()

template<class T, class P>
const_iterator tdc::GenericViewBase< T, P >::end ( ) const
inlineprotected

Definition at line 93 of file GenericViewBase.hpp.

◆ ends_with() [1/2]

template<class T, class P>
bool tdc::GenericViewBase< T, P >::ends_with ( const T &  c) const
inlineprotected

Definition at line 215 of file GenericViewBase.hpp.

◆ ends_with() [2/2]

template<class T, class P>
bool tdc::GenericViewBase< T, P >::ends_with ( const GenericViewBase< T, const T *> &  x) const
inlineprotected

Definition at line 219 of file GenericViewBase.hpp.

◆ front()

template<class T, class P>
const_reference tdc::GenericViewBase< T, P >::front ( ) const
inlineprotected

Definition at line 143 of file GenericViewBase.hpp.

◆ max_size()

template<class T, class P>
size_type tdc::GenericViewBase< T, P >::max_size ( ) const
inlineprotected

Definition at line 125 of file GenericViewBase.hpp.

◆ op_eq()

template<class T, class P>
static bool tdc::GenericViewBase< T, P >::op_eq ( const GenericViewBase< T, const T *> &  lhs,
const GenericViewBase< T, const T *> &  rhs 
)
inlinestaticprotected

Definition at line 227 of file GenericViewBase.hpp.

◆ op_greater()

template<class T, class P>
static bool tdc::GenericViewBase< T, P >::op_greater ( const GenericViewBase< T, const T *> &  lhs,
const GenericViewBase< T, const T *> &  rhs 
)
inlinestaticprotected

Definition at line 244 of file GenericViewBase.hpp.

◆ op_greater_eq()

template<class T, class P>
static bool tdc::GenericViewBase< T, P >::op_greater_eq ( const GenericViewBase< T, const T *> &  lhs,
const GenericViewBase< T, const T *> &  rhs 
)
inlinestaticprotected

Definition at line 248 of file GenericViewBase.hpp.

◆ op_less()

template<class T, class P>
static bool tdc::GenericViewBase< T, P >::op_less ( const GenericViewBase< T, const T *> &  lhs,
const GenericViewBase< T, const T *> &  rhs 
)
inlinestaticprotected

Definition at line 236 of file GenericViewBase.hpp.

◆ op_less_eq()

template<class T, class P>
static bool tdc::GenericViewBase< T, P >::op_less_eq ( const GenericViewBase< T, const T *> &  lhs,
const GenericViewBase< T, const T *> &  rhs 
)
inlinestaticprotected

Definition at line 240 of file GenericViewBase.hpp.

◆ op_not_eq()

template<class T, class P>
static bool tdc::GenericViewBase< T, P >::op_not_eq ( const GenericViewBase< T, const T *> &  lhs,
const GenericViewBase< T, const T *> &  rhs 
)
inlinestaticprotected

Definition at line 232 of file GenericViewBase.hpp.

◆ operator std::vector< T >()

template<class T, class P>
tdc::GenericViewBase< T, P >::operator std::vector< T > ( ) const
inlineprotected

Definition at line 79 of file GenericViewBase.hpp.

◆ operator=()

template<class T, class P>
GenericViewBase& tdc::GenericViewBase< T, P >::operator= ( const GenericViewBase< T, P > &  other)
inlineprotected

Definition at line 83 of file GenericViewBase.hpp.

◆ operator[]()

template<class T, class P>
const_reference tdc::GenericViewBase< T, P >::operator[] ( size_type  n) const
inlineprotected

Definition at line 133 of file GenericViewBase.hpp.

◆ pop_back()

template<class T, class P>
void tdc::GenericViewBase< T, P >::pop_back ( )
inlineprotected

Definition at line 157 of file GenericViewBase.hpp.

◆ pop_front()

template<class T, class P>
void tdc::GenericViewBase< T, P >::pop_front ( )
inlineprotected

Definition at line 162 of file GenericViewBase.hpp.

◆ rbegin()

template<class T, class P>
const_reverse_iterator tdc::GenericViewBase< T, P >::rbegin ( ) const
inlineprotected

Definition at line 97 of file GenericViewBase.hpp.

◆ remove_prefix()

template<class T, class P>
void tdc::GenericViewBase< T, P >::remove_prefix ( size_type  n)
inlineprotected

Definition at line 198 of file GenericViewBase.hpp.

◆ remove_suffix()

template<class T, class P>
void tdc::GenericViewBase< T, P >::remove_suffix ( size_type  n)
inlineprotected

Definition at line 202 of file GenericViewBase.hpp.

◆ rend()

template<class T, class P>
const_reverse_iterator tdc::GenericViewBase< T, P >::rend ( ) const
inlineprotected

Definition at line 101 of file GenericViewBase.hpp.

◆ size()

template<class T, class P>
size_type tdc::GenericViewBase< T, P >::size ( ) const
inlineprotected

Definition at line 121 of file GenericViewBase.hpp.

◆ slice()

template<class T, class P>
GenericViewBase tdc::GenericViewBase< T, P >::slice ( size_type  from,
size_type  to = npos 
) const
inlineprotected

Definition at line 178 of file GenericViewBase.hpp.

◆ starts_with() [1/2]

template<class T, class P>
bool tdc::GenericViewBase< T, P >::starts_with ( const T &  c) const
inlineprotected

Definition at line 206 of file GenericViewBase.hpp.

◆ starts_with() [2/2]

template<class T, class P>
bool tdc::GenericViewBase< T, P >::starts_with ( const GenericViewBase< T, const T *> &  x) const
inlineprotected

Definition at line 210 of file GenericViewBase.hpp.

◆ substr()

template<class T, class P>
GenericViewBase tdc::GenericViewBase< T, P >::substr ( size_type  pos,
size_type  len = npos 
) const
inlineprotected

Definition at line 190 of file GenericViewBase.hpp.

◆ swap()

template<class T, class P>
void tdc::GenericViewBase< T, P >::swap ( GenericViewBase< T, P > &  other)
inlineprotected

Definition at line 168 of file GenericViewBase.hpp.

Friends And Related Function Documentation

◆ GenericViewBase< T, const T *>

template<class T, class P>
friend class GenericViewBase< T, const T * >
friend

Definition at line 24 of file GenericViewBase.hpp.

◆ GenericViewBase< T, T *>

template<class T, class P>
friend class GenericViewBase< T, T * >
friend

Definition at line 25 of file GenericViewBase.hpp.

◆ swap

template<class T, class P>
template<class U , class Q >
void swap ( GenericViewBase< U, Q > &  lhs,
GenericViewBase< U, Q > &  rhs 
)
friend

Member Data Documentation

◆ m_data

template<class T, class P>
P tdc::GenericViewBase< T, P >::m_data
protected

Definition at line 37 of file GenericViewBase.hpp.

◆ m_size

template<class T, class P>
size_t tdc::GenericViewBase< T, P >::m_size
protected

Definition at line 38 of file GenericViewBase.hpp.

◆ npos

template<class T, class P>
const size_type tdc::GenericViewBase< T, P >::npos = -1
staticprotected

Definition at line 35 of file GenericViewBase.hpp.


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