tudocomp
– The TU Dortmund Compression Framework
tdc::io::InputView Class Reference

Provides a view on the input that allows for random access. More...

#include <InputView.hpp>

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

Public Member Functions

 InputView (InputView &&mem)
 Move constructor. More...
 
 InputView (const InputView &other)=delete
 Copy constructor (deleted). More...
 
 InputView ()=delete
 Default constructor (deleted). More...
 
- Public Member Functions inherited from tdc::ConstGenericView< T >
 ConstGenericView ()
 Construct a empty View. More...
 
 ConstGenericView (const T *data, size_t len)
 Construct a View pointing at len elements starting from data More...
 
 ConstGenericView (const ConstGenericView &other)
 Construct a View as a copy of other More...
 
 ConstGenericView (const GenericView< T > &other)
 Construct a View as a copy of other More...
 
 ConstGenericView (const std::vector< T > &other)
 Construct a View pointing at the contents of a vector. More...
 
template<size_t N>
 ConstGenericView (const std::array< T, N > &other)
 Construct a View pointing at the contents of a array. More...
 
 operator std::vector< T > () const
 Construct a vector with the contents of this View. More...
 
const_iterator begin () const
 Begin of iterator. More...
 
const_iterator end () const
 End of iterator. More...
 
const_reverse_iterator rbegin () const
 Begin of reverse iterator. More...
 
const_reverse_iterator rend () const
 End of reverse iterator. More...
 
const_iterator cbegin () const
 Begin of const iterator. More...
 
const_iterator cend () const
 End of const iterator. More...
 
const_reverse_iterator crbegin () const
 Begin of const reverse iterator. More...
 
const_reverse_iterator crend () const
 End of const reverse iterator. More...
 
size_type size () const
 Returns size of the View. More...
 
size_type max_size () const
 Returns max size of the View. Always the same as size() More...
 
bool empty () const
 Returns true if empty. More...
 
const_reference operator[] (size_type pos) const
 Access the element at pos More...
 
const_reference at (size_type pos) const
 Access the element at pos More...
 
const_reference front () const
 Access the first element. More...
 
const_reference back () const
 Access the last element. More...
 
const value_typedata () const noexcept
 The backing memory location. More...
 
void pop_back ()
 Remove the last element from the View. More...
 
void pop_front ()
 Remove the first element from the View. More...
 
void swap (ConstGenericView &other)
 Swap two Views. More...
 
void clear ()
 Sets the size to 0. More...
 
ConstGenericView substr (size_type pos, size_type len=npos) const
 Construct a new View that is a sub view into the current one. More...
 
ConstGenericView slice (size_type from, size_type to=npos) const
 Construct a new View that is a sub view into the current one. More...
 
void remove_prefix (size_type n)
 Removes the first n elements from the View. More...
 
void remove_suffix (size_type n)
 Removes the last n elements from the View. More...
 
bool starts_with (const T &other) const
 Returns true if the View starts with the literal other More...
 
bool starts_with (const ConstGenericView< T > &other) const
 Returns true if the View starts with the sequence of literals contained in other. More...
 
bool ends_with (const T &other) const
 Returns true if the View ends with the literal other More...
 
bool ends_with (const ConstGenericView< T > &other) const
 Returns true if the View ends with the sequence of literals contained in other. More...
 

Friends

class Input
 Convenience shortcut to io::Input. More...
 

Additional Inherited Members

- Public Types inherited from tdc::ConstGenericView< T >
using value_type = typename Super::value_type
 
using const_reference = typename Super::const_reference
 
using const_pointer = typename Super::const_pointer
 
using const_iterator = typename Super::const_iterator
 
using const_reverse_iterator = typename Super::const_reverse_iterator
 
using difference_type = typename Super::difference_type
 
using size_type = typename Super::size_type
 
- Static Public Attributes inherited from tdc::ConstGenericView< T >
static const size_type npos = Super::npos
 Sentinel value indicating a index at the end of the view. More...
 

Detailed Description

Provides a view on the input that allows for random access.

See also
View.

Definition at line 29 of file InputView.hpp.

Constructor & Destructor Documentation

◆ InputView() [1/3]

tdc::io::InputView::InputView ( InputView &&  mem)
inline

Move constructor.

Definition at line 37 of file InputView.hpp.

◆ InputView() [2/3]

tdc::io::InputView::InputView ( const InputView other)
inlinedelete

Copy constructor (deleted).

◆ InputView() [3/3]

tdc::io::InputView::InputView ( )
inlinedelete

Default constructor (deleted).

Friends And Related Function Documentation

◆ Input

friend class Input
friend

Convenience shortcut to io::Input.

Definition at line 30 of file InputView.hpp.


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